Convert UTF8 to Data URL screenshot

Convert UTF8 to Data URL

Wrap text in a data URL, base64 or percent-encoded, with the media type of your choice.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What this page computes

Paste text and the page wraps it in a data: URL. The base64 form encodes the UTF-8 bytes of the text after the media type, so Hi becomes data:text/plain;base64,SGk=. The percent form escapes every byte outside A–Z a–z 0–9 - _ . ~ and leaves the rest literal, which keeps a short plain-text URL readable. The second line states the byte count and the length of the URL produced.

Where it stops

The media type is chosen from a short list, because a browser sniffs an unknown one and the result stops being predictable. The URL is printed for copying, not fetched: nothing is loaded and no blob is created, so a large text produces a long string rather than a download. Input above the page's five-megabyte limit is refused by the engine before the encoder runs.

Encoding happens in this tab. Nothing is uploaded, no URL is stored, and the same text always prints the same string.

`Hello, world!` becomes `data:text/plain;base64,SGVsbG8sIHdvcmxkIQ==` — the UTF-8 bytes of the text, base64 encoded after the media type you choose. The percent form escapes every byte outside `A–Z a–z 0–9 - _ . ~` instead.

The URL is printed for copying and never fetched: no blob is created and no request is made.

How to use it

Paste the text and choose. Base64 is the compact form for markup and JSON; percent keeps a short plain-text URL readable, since only spaces and punctuation are escaped.

The encoding

The text is first written as UTF-8 bytes, then either grouped three at a time into four base64 characters with `=` padding, or written byte by byte as `%XX` except for the unreserved set. The character count covers the whole URL, prefix included.

Where it stops

A media type outside the list is refused, an empty box is refused, and an oversized paste is stopped by the engine's input cap. The page does not open the URL, does not check that the media type matches the content, and does not shorten a long result.

What to Expect

Best for

  • `Hello, world!` becomes `data:text/plain;base64,SGVsbG8sIHdvcmxkIQ==` — the UTF-8 bytes of the text, base64 encoded after the media type you choose.
  • Seeing the result before copying it.

What this tool keeps

  • Your input is converted in the browser and never posted, so the page works offline and retains nothing.

Sample input

Hello, world!

Sample output

data:text/plain;base64,SGVsbG8sIHdvcmxkIQ== text/plain, base64 — 13 UTF-8 bytes → 43 characters

Frequently asked questions

How do I use it?

Paste the text, pick a media type and a payload form, then press Run. The data URL is printed first with its byte and character counts underneath.

Is anything uploaded?

No. The text is converted in this tab with JavaScript: no request is made, no account is needed, nothing is stored, and the page keeps working offline once loaded.

What are its limits?

The media type must come from the five offered, because a browser sniffs an unknown type and the result stops being predictable. Input above the page's five-megabyte limit must be refused by the engine before any encoding starts.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.