17 chars · 1 line
Waiting for input
17 chars · 1 line
Waiting for input
YAML string escape troubleshooting
The validator above starts with a Windows-style path inside a double-quoted YAML scalar. In double quotes, YAML treats backslashes as escape introducers, so \q is parsed as an escape instead of literal path text and the document fails validation. This tool is free to use. No account or payment is required.
Last updated
YAML double-quoted strings support escape sequences for characters such as newlines, tabs, quotes, and Unicode values. Because the backslash has syntax meaning in this scalar style, arbitrary combinations are not accepted as literal text.
When a value should preserve backslashes literally, single quotes can be easier to review because backslashes do not start escape sequences there. Keep the quoting choice aligned with the exact value your application needs.
The double-quoted value treats \q as an escape. Single quotes preserve the backslashes as path characters.
path: "C:\q\data"path: 'C:\q\data'Common questions
Double-quoted YAML scalars interpret backslashes as escape syntax. Unsupported escape letters cause a parser error instead of being preserved literally.
Yes. Single-quoted YAML strings commonly simplify literal backslashes because the backslash does not introduce YAML escapes there.
No. This problem page validates the YAML and shows a corrected example so you can choose the representation that matches your data.
Debugging a specific YAML issue? Browse YAML troubleshooting.