Back to Hub

Free Online URL Encoder / Decoder

Encode & decode URLs, Base64, HTML entities, and more — fully offline.

Input

0 chars

Output

0 chars

Quick Encode Examples

URL with spaces
HTML tags
Plain text
Email mailto
JSON data
File path

The Ultimate Guide to URL Encoding (Percent-Encoding) & RFC 3986

Uniform Resource Identifiers (URIs) are constrained to a specific set of safe ASCII characters. When you pass arbitrary text, spaces, symbols, or international Unicode strings through URL paths or query string parameters (?key=value), characters outside the unreserved character set must be converted into standard percent-encoded sequences (%HH).

Reserved Characters & Percent-Encoded Replacements

Character Description Percent-Encoded Usage Context
[Space] Space character %20 (or + in query) General text separation
? Question mark %3F Query delimiter
& Ampersand %26 Parameter separator
= Equals sign %3D Key-value delimiter
/ Forward slash %2F Path segment separator
# Hash / Number sign %23 Anchor / Fragment identifier

encodeURI vs encodeURIComponent

In JavaScript and modern web frameworks:
encodeURI: Encodes a complete URI, preserving structural characters like : / ? # & =.
encodeURIComponent: Encodes individual query parameter values, replacing structural delimiters (like & = ?) so they don't break parameter boundaries.

Frequently Asked Questions

What is a URL encoder and decoder?

A URL encoder/decoder is a utility tool that translates characters within a Uniform Resource Identifier (URI) into a format that can be safely transmitted over the Internet. It replaces unsafe ASCII characters with a '%' followed by two hexadecimal digits (known as percent-encoding) and translates them back to standard characters during decoding.

Why is URL encoding necessary?

URL encoding is necessary because URLs can only contain a limited set of characters from the US-ASCII character set. Characters outside this set (such as spaces, non-alphanumeric characters, and reserve characters like '?', '&', and '=' when used outside their special meanings) must be encoded to avoid breaking browser requests or web server route parsers.

How do I encode or decode a URL in JavaScript?

In JavaScript, you can use the built-in global functions: encodeURIComponent(string) to encode query parameter values, encodeURI(string) to encode a full URL, decodeURIComponent(string) to decode parameters, and decodeURI(string) to decode a full URL.

Does this tool support Base64 encoding and decoding?

Yes, in addition to standard URL percent-encoding, this web tool provides tabs to easily encode and decode Base64 strings, convert HTML entities, and represent raw strings as hexadecimal values. All operations are run securely inside your browser window.

Was this page helpful?

Related Searches

Deep dive into url encoder url encoder online free URL encoder/decoder URL Decode online base64 decode online decode url online
×
× Close