n8n-io/n8n · error · ExpressionExtensionError

Parsing failed. Check you're using double quotes

Error message

Parsing failed. Check you're using double quotes

What it means

parseJson() caught a JSON.parse failure and the input contains a single quote — the most common cause being JSON written with single-quoted strings ('key' instead of "key"), which is invalid JSON. The hint variant of the error points at that specific mistake.

Solutions

  1. Use double quotes for all JSON strings and keys
  2. If the source data genuinely uses single quotes, convert it in a Code node before parsing
  3. Check for unescaped quotes or trailing commas if switching to double quotes doesn't fix it
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at packages/@n8n/expression-runtime/src/extensions/string-extensions.ts:428 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/f40d9055ace987cb. Report an issue: GitHub.

Appendix: source

Thrown at packages/@n8n/expression-runtime/src/extensions/string-extensions.ts:428

	// No path segment found
	if (pathStart >= value.length || value[pathStart] !== '/') return '/';

	// Find where path ends (first ? or #)
	let pathEnd = pathStart;
	while (pathEnd < value.length && value[pathEnd] !== '?' && value[pathEnd] !== '#') {
		pathEnd++;
	}

	return value.slice(pathStart, pathEnd) || '/';
}

function parseJson(value: string): unknown {
	try {
		return JSON.parse(value);
	} catch (error) {
		if (value.includes("'")) {
			throw new ExpressionExtensionError("Parsing failed. Check you're using double quotes");
		}
		throw new ExpressionExtensionError('Parsing failed');
	}
}

function toBoolean(value: string): boolean {
	const normalized = value.toLowerCase();
	const FALSY = new Set(['false', 'no', '0']);
	return normalized.length > 0 && !FALSY.has(normalized);
}

function base64Encode(value: string): string {
	return toBase64(value);
}

function base64Decode(value: string): string {
	return fromBase64(value);
}

View on GitHub (pinned to 5ac6606e81)