URL Encode & Decode
Use the CaseSwitch URL Encode & Decode tool to percent-encode text for query parameters or decode `%HH` sequences back to readable characters. Choose Encode or Decode, paste the value, and copy the result. Processing stays in this browser.
Written by the CaseSwitch editorial team. We maintain these tools in the browser so drafts, keys, and images stay on your device.
Last reviewed: 23 July 2026
Processed locally in your browser. Nothing is sent to a server.
Paste or type text to convert. Output stays empty until there is input.
Character count: 0 · Word count: 0 · Line count: 0
Examples
Encode a space
Input
hello world
Output
hello%20world
Encode equals and ampersand
Input
a=b&c=d
Output
a%3Db%26c%3Dd
Encode UTF-8 (café)
Input
café
Output
caf%C3%A9
Decode %20 to space
Input
hello%20world
Output
hello world
Decode a query fragment
Input
a%3Db%26c%3Dd
Output
a=b&c=d
How to use
- Choose Encode or Decode.
- Paste the raw text or the percent-encoded string.
- Copy the result. For query values, encode each parameter value separately — not the whole `https://` URL.
What this tool is for
Browsers put unsafe characters on the wire as percent-encoding (space → `%20`). This page encodes or decodes strings for query parameters and path experiments. It is not Base64 and not a full URL parser that rebuilds every relative-link edge case.
How it works
Encode mode uses `encodeURIComponent`-style encoding by default (component encoding). An optional encode-all style can percent-encode every character. Decode mode runs `decodeURIComponent` after turning `+` into spaces (form-body habit). Invalid escape sequences fail instead of guessing.
When to use it
Building a query string by hand, debugging why a redirect broke, inspecting logs that show encoded URLs, and teaching the difference between component encoding and full-URI encoding.
When not to use it
Do not encode an entire URL including `https://` if you only meant to encode a parameter — you will break the scheme. Base64 is a different alphabet. UTM URL Generator adds campaign parameters rather than encoding arbitrary text.
How it compares to related tools
UTF-8 Encoder & Decoder shows raw bytes. Base64 Encode & Decode is for binary-in-ASCII transport. UTM URL Generator builds campaign query params on a base URL.
Common mistakes
Double-encoding (`%` → `%25`). Encoding slashes in a path you wanted to keep as structure. Confusing form `+` spaces with `%20`. Decoding once when the producer encoded twice.
encodeURIComponent vs encodeURI
Component encoding (this tool’s default spirit) encodes `?`, `&`, and `=` so values are safe inside a query. `encodeURI` leaves those characters so a full URL shape survives. Encode the piece you are inserting — not always the entire address bar string.
Plus signs and forms
In `application/x-www-form-urlencoded` bodies, `+` often means space. Paths usually use `%20`. This decoder maps `+` to space before decode. Know which standard your string came from.
Frequently asked questions
Should I use encodeURIComponent or encodeURI?+
encodeURIComponent is for parameters. encodeURI is for a full URL and will not encode `?` and `&`. This tool follows component-style encoding unless you use encode-all.
Why is + a space after decode?+
In form bodies, `+` means space. In path encoding, spaces are usually `%20`. Match the producer.
Why did my https:// break?+
You probably encoded the whole URL. Encode only the query value or path segment you are inserting.
Is this the same as Base64?+
No. Percent-encoding is for URLs. Base64 is a different binary-to-ASCII mapping.
Does UTF-8 matter?+
Yes. Non-ASCII characters become UTF-8 bytes, then `%HH` pairs (café → caf%C3%A9).
Is my text uploaded?+
No. Encode and decode run in this browser.
Does this tool send my payload to CaseSwitch?+
No. Formatting, encoding, and naming conversions for this page run in your browser after load — your sample stays on the device.
Related guides
Read our original articles on this topic.
SEO
SEO URL Slugs: Why kebab-case Wins Over snake_case
Google treats hyphens and underscores differently. Learn the SEO best practices for formatting URL slugs and naming files.
Developer
Base64 Encoding Explained: When and Why to Use It
Understand how Base64 transforms binary data into text, why it increases file size, and where it is used in modern web development.
Related tools
Base64 Encode & Decode
Embedding a small SVG or icon in a data URL experiment, inspecting the readable middle of a JWT (still not verifying the signature here), converting clipboard text for an API field that expects Base64, and teaching the difference between encoding and encryption with a live round-trip.
UTF-8 Encoder & Decoder
Fixing a file that was read as Latin-1, explaining why a database column “looks wrong,” checking emoji byte length, and teaching that characters are not always one byte.
UTM URL Generator
Email campaigns, partner posts, QR codes to a campaign landing page, paid ads that your analytics still reads as UTM, and standardizing naming before a launch.
Hex to Text Converter
Reading a hex dump from a ticket, checking a short ASCII payload, teaching binary/hex alongside the [Binary Code Translator](/binary-code-translator/), and round-tripping a brand string.
Binary Code Translator
Computer science homework, explaining ASCII vs UTF-8, decoding a bitstring from an ASCII-based puzzle, and round-tripping a short word.