Encoding & Escaping

Encoding and escaping make text safe to put somewhere it would otherwise break: Base64 turns bytes into ASCII for headers and data URIs, percent-encoding makes text safe inside URLs, and escaping turns quotes, backslashes and control characters into sequences a language or format can parse.

Pick the tool for the destination of your text. Use URL encoding for query strings, HTML escaping for markup, and the language-specific escapers for string literals in source code. Escaping is not a security boundary on its own — for databases, parameterized queries are the right defence.

All Encoding & Escaping (10)

More developer tools