Skip to main content
CaseSwitch

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

  1. Choose Encode or Decode.
  2. Paste the raw text or the percent-encoded string.
  3. 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.

Related tools