URL Encoder

URL encode text online with percent-encoding for query strings and links — free and instant.

About

About the URL Encoder

Percent-encodes text so it's safe to use inside a URL, with three modes for query values, whole URLs and form data.

Developers use it to build query strings by hand or check what a value looks like once encoded, while anyone crafting a shareable link uses it to make sure special characters like spaces and ampersands don't break the URL. It's one of many free data tools on Toolapt, and like every tool here, it's free to use with no sign-up and no limit on how many times you run it.

Choose what to view about this tool

Guide

Using the URL Encoder

  1. 1

    Step 1

    Type or paste the text you want to encode.

  2. 2

    Step 2

    Pick a mode: query value, whole URL, or form data.

  3. 3

    Step 3

    Click "Encode" to see the percent-encoded result.

  4. 4

    Step 4

    Click "Copy" to copy the result, or "Clear" to start over.

  • Three encoding modes: query value, whole URL, and form data
  • Query value mode matches JavaScript's encodeURIComponent exactly
  • Whole URL mode matches encodeURI, preserving : / ? # and other URL structure characters
  • Form data mode turns spaces into + , matching a browser form submission
  • One click to copy the encoded result
  • Works entirely in your browser — nothing you type is sent to a server
  • Free to use, with no sign-up and no limit on how many times you run it

Developers

Developers use the URL Encoder for building a query string parameter by hand, or double-checking exactly how a value gets encoded before sending a request.

Marketers

Marketers use the URL Encoder for encoding a UTM campaign value that contains spaces or special characters into a shareable link.

QA engineers

QA engineers use the URL Encoder for preparing edge-case query values — spaces, ampersands, unicode — to test how a system handles them.

Students learning web basics

Students learning web basics use the URL Encoder for seeing exactly how reserved and special characters get percent-encoded.

Examples

URL Encoder examples

3 worked examples

01

Encoding a query value

Type "hello world!" with Mode set to Query value to get hello%20world! — the space becomes %20 while the exclamation mark, which encodeURIComponent doesn't need to escape, stays as-is.

02

Encoding a whole URL

Type "https://example.com/a b?x=1&y=2" with Mode set to Whole URL to get https://example.com/a%20b?x=1&y=2 — only the space is escaped, while : / ? & = stay untouched.

03

Encoding form data

Type "hello world" with Mode set to Form data to get hello+world, matching how a browser encodes a submitted HTML form.

FAQ

Frequently asked questions

Quick answers to common questions about the URL Encoder.

What does the URL Encoder do?

It percent-encodes text so it can be safely included in a URL, using whichever of three modes fits what you're encoding.

Is the URL Encoder free to use?

Yes. It's free, with no sign-up, no watermark and no limit on how many times you use it.

Is my text safe when I use this tool?

Yes. Encoding happens entirely on your own device using your browser's built-in encoding functions — nothing you type is sent to a server.

What's the difference between the three modes?

Query value encodes almost every special character, for a single value going into a query string. Whole URL leaves structural characters like : / ? # untouched, for encoding an entire URL. Form data behaves like query value but turns spaces into + , matching how browsers submit HTML forms.

Which mode should I use for a query string parameter?

Query value (encodeURIComponent) is almost always the right choice for a single parameter's value.

Does this handle Unicode characters, like accented letters or emoji?

Yes. Unicode text is percent-encoded correctly as UTF-8 bytes in all three modes.

Can I use the URL Encoder on my phone?

Yes. The page is fully responsive and works on mobile, tablet and desktop browsers alike.

Does the URL Encoder have any limitations?

It's built for typical text and URL values. There's no artificial length limit, though very large inputs may take a moment longer.

Still have a question? Contact us

Report a problem

URL Encoder

What went wrong?
    or paste a screenshot