Web & HTTP
Build a data: URL from text or a small file, or paste one to read it back. The bytes stay in your browser. A data URL is not a secret, and it is not encryption.
1
Data URL
data:text/plain;charset=utf-8;base64,SGVsbG8=Did you know? RFC 2397 is short: four pages, dated August 1998, written by L. Masinter. The scheme name is data. The token ;base64 sits before the comma, not after it.
A data URL carries the bytes in the URL itself. RFC 2397 (August 1998) defines the form data:[media type][;base64],data. When the media type is omitted, the default is text/plain with US-ASCII.
This page builds that URL from text or from a small file, and it reads one you paste. Base64 is an encoding. Anyone who can see the URL can recover the bytes. The page does not open the URL and does not upload the file.
text/plain, utf-8, Hello
data:text/plain;charset=utf-8;base64,SGVsbG8=
data:text/plain,a#b
data:text/plain;charset=utf-8,a%23b
A raw # starts a fragment, so the browser drops the rest of the data. This page percent-encodes it when Base64 is off. Base64 has no # at all.
Writing charset=iso-8859-1 while the bytes are UTF-8 makes the label a lie. This page encodes the bytes in the charset you named, and it refuses text that does not fit.
A data URL whose media type is text/html or image/svg+xml can run script if you navigate to it. This page only shows the text, and an image preview is loaded as an image, which does not run script.
The comma is mandatory, even when the data is empty. data:, is a valid, empty text URL.
Browsers impose their own limits, often far below a megabyte when the URL is opened as a page. This page stops at 100,000 characters of text and 256 KB for a file.
The share link stores the media type, the charset, the text, and the Base64 switch. It stays off above 20,000 characters, and it never stores a binary file.
RFC 2397 is short: four pages, dated August 1998, written by L. Masinter. The scheme name is data. The token ;base64 sits before the comma, not after it.
If you paste data:,Hello%20world, there is no media type and no charset. The RFC default is text/plain;charset=US-ASCII. The percent-encoding is still decoded as UTF-8, which is what encodeURIComponent produces.