ToolMill.io

URL Encode / Decode (Percent-Encoding)

URL Encode/Decode (percent-encoding) converts unsafe characters into a URL-safe format and back again. Use it for query strings, redirect URLs, UTM parameters, and debugging API requests (RFC 3986). Runs 100% locally in your browser — no uploads — and works offline after installing ToolMill as a PWA.

Encoding

Try it

Examples

URL-encode text for a query parameter
Input
summer sale & shoes
Output
summer%20sale%20%26%20shoes
Decode percent-encoded URL text
Input
summer%20sale%20%26%20shoes
Output
summer sale & shoes

When to encode a full value vs part of a URL

The most common mistake with percent-encoding is encoding the wrong portion of a URL. In many workflows, you only want to encode a query value, path segment, fragment, or redirect target rather than the entire URL string. This page uses encodeURIComponent and decodeURIComponent, which are best suited to individual values and components.

Characters that usually need encoding

Spaces, ampersands, equals signs, question marks, hashes, percent signs, slashes in component values, and non-ASCII characters are common reasons to encode text before placing it inside a URL. That is especially important for search queries, labels, filenames, and user-supplied values that would otherwise break a query string or path segment.

Common mistakes with URL encoding

Double-encoding is one of the most common problems. For example, an existing %20 encoded again becomes %2520. Another common mistake is decoding an entire URL when only one parameter value should be decoded. It is also important to remember that this page produces percent-encoded spaces like %20, not form-style plus signs.

Practical workflows

Use this page when preparing a query parameter for a link, cleaning up UTM or tracking values, decoding percent-encoded text copied from logs or browser tools, or making a path segment safe before inserting it into another URL. It is most helpful when you are handling one value at a time and want to see the exact percent-encoded result.

What happens with non-English text and emoji

This tool percent-encodes UTF-8 bytes, which is why accented characters, non-Latin text, and emoji often become multiple percent codes instead of a single unit. That behavior is normal and useful when the destination expects a URL-safe representation of the original Unicode text.

Troubleshooting decode errors

Before You Rely on a URL-Encoded Value

Test the output in the real destination context before assuming it is correct. If something still looks wrong, check for double-encoding, mixed handling of spaces and plus signs, or a mismatch between how your destination treats full URLs versus individual parameter values.

Why Decoded Text Can Still Be Wrong for Your Application

Correct decoding here does not guarantee another app will interpret the text the same way. Some systems treat plus signs as spaces, others preserve them literally, and reserved characters may still need special handling depending on whether the text belongs in a path, query string, or form submission.

How to Tell Whether You Should Encode a Full URL or Just One Part

Encoding needs depend on context. A query parameter value often needs encoding even when the rest of the URL should stay readable, while an already assembled URL may break if you encode separators such as ?, &, =, or /. Think about whether you are preparing one component or the entire address before using the result.

Decode failures usually mean the pasted text contains malformed percent sequences, mixed plain and encoded content, or a string that has already been decoded once. If the result looks wrong, check whether you pasted a full URL instead of a single component and whether percent signs were doubled by earlier processing.

Related tools