Skip to content
ToolzKit

Encoding

URL Encoder

Percent-encode text or URLs using encodeURIComponent or encodeURI, with a live preview.

Text or URL

Encoded

Encoded output appears here.

Component mode escapes every reserved character (best for query values); Full URI mode preserves URL structure characters like :, / and ?.

About the URL Encoder

This tool percent-encodes text so it can be safely placed inside a URL, whether as a full address or a single query parameter value. Choose between two encoding strategies depending on whether you're encoding a whole URL or just a fragment of one.

How to use it

  1. 01Paste the text or URL you want to encode.
  2. 02Pick Component mode for query values, or Full URI mode for whole URLs.
  3. 03Copy the percent-encoded result.

Features

  • Component mode (encodeURIComponent) escapes every reserved character
  • Full URI mode (encodeURI) preserves structural characters like :, /, ?
  • Instant, live-updating output as you type

Practical examples

Building query strings

Encode a search phrase with spaces and symbols before appending it to a URL.

Sharing links

Encode a full URL that contains spaces or non-ASCII characters so it stays clickable.

Limitations

  • Component and Full URI modes intentionally treat reserved characters differently — pick the one matching your use case.

Privacy

Encoding happens locally in your browser; no data is sent anywhere.

Read the full privacy policy for how the site as a whole handles data.

Frequently asked questions

What's the difference between the two modes?

encodeURIComponent escapes everything except a small set of characters, making it right for individual values like query parameters. encodeURI leaves URL-structure characters like : and / untouched, making it right for whole URLs.

Why does my URL still have a few unencoded characters in Full URI mode?

Full URI mode deliberately preserves reserved delimiters so the string remains a valid URL.

Does this validate that my URL is well-formed?

No — for structural validation, use a URL parser tool instead.