filemarkr
All ToolsGuides
filemarkr

60+ free developer tools that run entirely in your browser — JSON formatter, JWT decoder, Base64, diff checker, regex tester, hash generator and more. No upload, no sign-up, completely private.

JSON & Data

  • JSON Formatter
  • JSON Minifier
  • JSON Validator
  • JSON to CSV
  • CSV to JSON
  • JSON to YAML

Encode & Decode

  • Base64 Encode / Decode
  • Base64 to Image
  • Image to Base64
  • URL Encode / Decode
  • HTML Entity Encoder
  • JWT Decoder

Text Tools

  • Text Diff Checker
  • Case Converter
  • Word & Character Counter
  • Slug Generator
  • Remove Duplicate Lines
  • Sort Text Lines

Generators

  • UUID Generator
  • Password Generator
  • Lorem Ipsum Generator
  • QR Code Generator
  • Random Number Generator
  • NanoID Generator

Popular Guides

  • How to Format and Pretty-Print JSON (Without Breaking It)
  • How to Minify JSON and Shrink Your API Payloads
  • How to Validate JSON and Pinpoint the Exact Syntax Error
  • How to Convert JSON to CSV for Excel and Google Sheets
  • How to Convert CSV to JSON (With Proper Header Detection)
  • All guides →

Explore

  • All Tools
  • JSON Formatter
  • JWT Decoder
  • Diff Checker
  • UUID Generator

Company

  • About
  • Privacy
  • Terms
  • Sitemap

Our Promise

  • 100% in your browser
  • Zero uploads
  • No sign-up, always free

© 2026 filemarkr. Designed & developed by Naved Naik.  All processing happens locally in your browser.

All guides

Encode & Decode

How to Escape and Unescape Strings for JSON and JavaScript

Learn how backslash escaping works in JSON, JavaScript and other languages, and how to safely escape or unescape any string right in your browser.

Try the toolBackslash Escape / Unescape →

When a stray quote breaks your JSON

You paste a sentence into a JSON config, hit save, and the parser explodes with Unexpected token. Nine times out of ten the cause is a character that has special meaning inside a string literal — a double quote, a literal line break, or a backslash — that was never escaped. Every language that uses quoted strings needs a way to say “treat this next character as data, not syntax,” and that mechanism is backslash escaping.

How backslash escaping works

Inside a quoted string, the backslash (\) is an escape character. It tells the parser that the character immediately after it should be interpreted literally or as a control code, not as the end of the string or as ordinary text. So \" means “a real double-quote character,” and \\ means “a single literal backslash.”

The most common escape sequences are shared across JSON, JavaScript, and many other languages:

  • \" — a double quote inside a double-quoted string
  • \\ — a literal backslash
  • \n — newline (line feed)
  • \t — tab
  • \r — carriage return
  • \uXXXX — a Unicode code point, e.g. é for é

JSON keeps the list short and strict: those sequences plus \/, \b, and \f. JavaScript is looser — it also allows single-quoted and backtick strings, hex escapes like \x41, and template literals. That difference matters when you move text between a .json file and a .js source file.

A practical walkthrough

Say you have a raw multi-line string with quotes and a Windows path:

She said "hello"
Path: C:\Users\me

Dropped straight into JSON, that is invalid — the inner quotes close the string early and the backslashes start escape sequences. Escaped correctly, the same value becomes a single valid JSON string:

"She said \"hello\"\nPath: C:\\Users\\me"

Going the other direction, unescaping takes an escaped literal and gives you the human-readable original — handy when you pull a string out of a log file or an API response and want to read the real newlines and quotes. Paste the escaped value into the tool, click unescape, and you get the raw text back.

Common pitfalls

  • Double-escaping. If you escape an already-escaped string, \n becomes \\n and stops being a newline. Escape once, at the boundary where the text enters the string.
  • Forgetting the backslash itself. Regex patterns and Windows paths are full of backslashes; each one needs to become \\ in JSON.
  • Assuming JSON and JavaScript are identical. A single-quoted string with \x41 is fine in JS but invalid in JSON.
  • Hand-escaping long blocks. Manually inserting backslashes across dozens of lines is where typos creep in — let a tool do the mechanical part.

Do it in your browser

The Backslash Escape / Unescape tool escapes and unescapes strings entirely in your browser — nothing is uploaded, there’s no sign-up, and it’s free. Paste your text, choose escape or unescape, and copy the result. Once your string is clean, drop it into the JSON Formatter to validate the surrounding document, or reach for URL Encode / Decode when the same value needs to travel safely inside a query string.

Conclusion

Escaping is a small detail with an outsized power to break a build. Understanding the handful of core sequences — and letting a tool handle the tedious, error-prone conversion — keeps your strings valid whether they live in JSON, JavaScript, or anywhere else quotes and backslashes collide.

More guides

How to Format and Pretty-Print JSON (Without Breaking It)

Read

How to Minify JSON and Shrink Your API Payloads

Read

How to Validate JSON and Pinpoint the Exact Syntax Error

Read

How to Convert JSON to CSV for Excel and Google Sheets

Read