Escape JSON Strings Online Free
Overview
JSON strings require backslash escaping for special characters: double quotes become \", newlines become \n, and tab characters become \t. When embedding JSON inside another JSON string (common in config files and API wrappers), every character needs correct escaping. This tool handles it automatically.
How to Use This Tool
Paste your raw string into the input and click Escape. The tool produces a JSON-safe string with all special characters properly escaped. To reverse the process, paste an escaped string and click Unescape.
Ready to get started? It's free, no registration required, and your files never leave your device.
PDF Tool →Frequently Asked Questions
What characters need escaping in JSON?
Double quotes ("), backslashes (\), newlines (\n), carriage returns (\r), tabs (\t), and Unicode control characters (\u0000 through \u001F) all require escaping inside JSON strings.
Why does my JSON break when it contains a URL?
URLs with forward slashes are valid in JSON strings without escaping. The issue is usually an unescaped backslash in a Windows file path, which must be written as \\ in JSON.
What is the difference between JSON escape and URL encode?
JSON escaping uses backslash notation for special characters inside JSON strings. URL encoding uses percent notation (e.g. %20 for space) for characters in URLs. They are different encoding schemes.