Alpha DevTools logoAlpha DevTools
All ToolsBy Technology
Search tools…⌘K
ToolsText & StringString Escape / Unescape

String Escape / Unescape

Text & String

Escape and unescape strings for JSON, JavaScript, HTML entities, URL percent-encoding, regex special characters, and SQL. Supports encode and decode in one tool.

Raw
Escaped

Related Tools

Word CounterSlug GeneratorLorem Ipsum GeneratorString Utilities

About String Escape / Unescape

The String Escape & Unescape tool handles all the encoding and decoding tasks developers encounter when embedding text in different contexts. Whether you need to escape a user's input before embedding it in a JSON payload, encode a URL parameter, convert characters to HTML entities for safe rendering in a browser, escape a string for use in a regular expression, or sanitize a value before inserting it into SQL, this tool provides a dedicated mode for each format. Simply choose your encoding type, paste the raw or encoded text, and receive the correctly transformed output—eliminating the risk of subtle escaping mistakes that cause security issues or parsing errors.

Features

  • ✓JSON string escaping and unescaping (quotes, backslashes, control characters)
  • ✓JavaScript string escape for single-quoted and double-quoted string literals
  • ✓HTML entity encoding and decoding (including named and numeric entities)
  • ✓URL percent-encoding and decoding (RFC 3986 compliant)
  • ✓Regex special character escaping for safe use in regex patterns
  • ✓SQL string literal escaping for single-quote doubling and backslash modes
  • ✓Side-by-side input and output panels with live updates
  • ✓Detect mode: auto-identify the encoding of a pasted string

Common Use Cases

  • Escaping API response strings for safe inclusion in JSON payloads
  • Encoding query string parameters before appending to a URL
  • Converting user-generated content to HTML entities for XSS prevention
  • Escaping a regex search pattern that contains special characters like . or *
  • Decoding encoded URLs received in webhook requests or server logs
  • Preparing SQL string values by escaping single quotes to prevent injection

Frequently Asked Questions

QWhat is the difference between URL encode and HTML entity encode?

URL encoding (percent-encoding) represents characters as %XX hex sequences for safe transmission in URLs. HTML entity encoding uses & syntax like & or < to display reserved characters safely in HTML.

QDoes JSON escape handle Unicode characters?

Yes. Non-ASCII characters can be left as UTF-8 or converted to \uXXXX Unicode escape sequences, depending on your selected option.

QWhat SQL escaping style is used?

The tool supports two SQL modes: ANSI standard (double single-quotes: '' for '), and MySQL/PostgreSQL backslash mode (\' for '). Select the appropriate mode for your database.

QCan I detect what encoding is already applied to a string?

Yes. The 'Auto-detect' mode attempts to identify whether the input is URL-encoded, HTML-encoded, or JSON-escaped and applies the matching decode automatically.

See Also

  • Text Case Converterrelated
  • String Utilitiesrelated
  • Slug Generatorrelated
  • HTML Tag Stripperrelated
189+ tools·and growing
100% private·nothing uploaded
Zero signup·open instantly
Always free·no paywalls ever
Alpha DevTools logoAlpha DevTools

Fast, free developer utilities for daily tasks. No signup required. Everything runs in your browser.

GitHubTwitter

Categories

  • Formatters
  • Converters
  • Security
  • Encoders & Decoders
  • UI Tools
  • Diagrams
  • Text & String
  • All categories

Technologies

  • JSON
  • YAML
  • CSV
  • XML
  • SQL
  • HTML
  • CSS
  • All technologies

Popular Tools

  • JSON Formatter
  • UUID Generator
  • JWT Decoder
  • Regex Tester
  • SQL Formatter
  • YAML Formatter

Platform

  • Home
  • All Tools
  • By Technology
  • Licenses
  • Contact

© 2026 Alpha DevTools — All rights reserved.

189+ tools · 14 categories · Free forever·Open-source licenses