URL Encoder/Decoder
Percent-encode and decode URLs and query string values. Handles full URLs or individual components — paste any URL to encode special characters or decode percent-encoded strings.
Encode
Decode
How to use the url encoder/decoder
Encode a string for safe inclusion in a URL, or decode percent-encoded characters back to plain text. Two encoding modes: 'component' (encodes everything, including / and ?) and 'URI' (preserves URL structure characters).
Formula & explanation
Percent encoding replaces any non-ASCII or reserved character with %XX, where XX is the byte's UTF-8 hex. Reserved characters per RFC 3986 include : / ? # [ ] @ ! $ & ' ( ) * + , ; =.
Examples
"hello world" → "hello%20world". "/" stays "/" with encodeURI but becomes "%2F" with encodeURIComponent.
Frequently asked questions
- When do I use 'component' vs 'URI'?
- Use 'component' when encoding a value going inside a URL (a query param). Use 'URI' when encoding an entire URL that's already structured.
- What about + for spaces?
- Form-encoded URLs use + for space; percent-encoded URLs use %20. We emit %20 (the modern standard).
Related developer tools tools
- URL ParserDecompose any URL into its components — protocol, host, port, path, query parameters, and fragment. Great for debugging redirect chains, API endpoints, and UTM parameters.
- Base64 Encoder/DecoderEncode text or binary data to Base64 and decode Base64 strings back to text. Supports standard and URL-safe Base64. Useful for data URIs, API tokens, and email attachments.
- HTML Entities EncoderEncode text to HTML entities and decode entities back to text. Converts angle brackets, ampersands, quotes, and other special characters to safe equivalents for use in HTML templates and CMS workflows.
- JWT DecoderDecode JSON Web Tokens and inspect the header, payload, and signature. Paste any JWT to see claims, expiry, issuer, and algorithm — no secret key needed to decode.
- JSON FormatterPretty-print, minify, and validate JSON. Detects syntax errors with line numbers and supports nested structures of any depth.
- JSON DiffCompare two JSON values semantically. Ignores key order; shows added, removed, and changed fields with their JSONPath — great for diffing API responses and config files.