Skip to content

URL Encoder — Encode URLs and Query Strings Online

Free

Encode URLs and query parameters with percent-encoding. Handles special characters, spaces, and Unicode. Free, instant, runs in your browser.

url encoderpercent encode urlurl encoding tool
All Developer Tools

Settings guide

Encoding scope:

  • ·Encode component (recommended for parameters) — Encodes all characters that are not safe in a URL query value, including &, =, +, ?, #, and /. Use this when encoding a single query parameter value. Equivalent to JavaScript's encodeURIComponent().
  • ·Encode full URL — Encodes only characters not allowed anywhere in a URL, preserving structural characters like ://, /, ?, &, and =. Use this when encoding an entire URL while preserving its structure. Equivalent to JavaScript's encodeURI().

Space encoding:

  • ·%20 — The RFC 3986 standard for spaces in URLs. Works everywhere.
  • ·+ — The older HTML form encoding standard for spaces. Accepted by some older form processors. Prefer %20 for new code.

Format comparison

encodeURIComponent vs encodeURI in JavaScript: encodeURIComponent() encodes everything that is not a letter, digit, or one of - _ . ! ~ * ' ( ) — it is safe for encoding individual parameter values. encodeURI() preserves structural URL characters (://?&=#) and is used for encoding complete URLs. This tool maps to both modes.

URL encoding vs Base64 encoding: URL encoding keeps the content readable (spaces become %20, not unrecognisable characters). Base64 makes content unreadable but produces a compact, alphabet-restricted string. Use URL encoding for URL parameters; use Base64 when binary or arbitrary data must be embedded in text fields.

How it works

1

Identify safe characters

Letters (A–Z, a–z), digits (0–9), and a small set of unreserved characters (- _ . ~) are safe in URLs and pass through unchanged.

2

Convert to UTF-8 bytes

Each character that needs encoding is converted to its UTF-8 byte sequence. A single Unicode character may produce multiple bytes.

3

Percent-encode each byte

Each byte is written as % followed by two uppercase hexadecimal digits. A space (byte 0x20) becomes %20; an @ (byte 0x40) becomes %40.

4

Assemble output

The encoded string is assembled — safe characters unchanged, encoded characters as their %XX sequences. The result is a valid URL component safe for any HTTP request.

About this format

URLs can only contain a defined set of ASCII characters. Spaces, special characters, and non-ASCII Unicode must be percent-encoded — converted to `%XX` sequences where XX is the hexadecimal byte value — before they can appear in a URL without breaking the request.

The two most common encoding scenarios: encoding a query parameter that contains user input (a search term, an address, a name with accented characters), and encoding a full URL to embed it as a parameter inside another URL — such as a redirect target or a referral URL.

Paste your string or URL and the encoded version is produced immediately.

Frequently asked questions

What characters need to be URL encoded?+
Any character that is not a letter, digit, or one of - _ . ~ must be encoded in a URL query parameter. This includes spaces (%20), ampersands (%26), equals signs (%3D), slashes (%2F), hash symbols (%23), and all non-ASCII Unicode characters.
What is the difference between %20 and + for spaces?+
%20 is the RFC 3986 standard for encoding spaces in URLs. The + sign is an older HTML form encoding convention (application/x-www-form-urlencoded) that some servers still accept. For any new code, prefer %20 — it is unambiguous and universally supported.
Should I encode the entire URL or just the parameter values?+
Encode only the parameter values when building a URL programmatically. Encoding the full URL (including ://, /, ?, and &) will break the URL structure. Only encode the full URL when embedding one URL as a value inside another URL's parameter.
Why does my encoded URL not work when I paste it?+
You may have encoded structural characters that should remain as-is. The path separators (/), protocol (://), query start (?), and parameter separators (&) should not be encoded when building a complete URL. Encode only individual query parameter values.
Does URL encoding work for non-English characters?+
Yes. Unicode characters are first converted to UTF-8 bytes, then each byte is percent-encoded. The Cyrillic letter А (U+0410) encodes to %D0%90. Any Unicode character can be safely URL-encoded this way.

Related tools and guides