Web Dev

Data URI

Convert text or data to Data URI format.

How to use it

  1. Open Devly from the wrench in your menu bar, or press ⌃⌥⌘D. Press ⌘P, type Data URI and press Return.
  2. Choose Encode or Decode at the top.
  3. Paste or type your text into Input.
  4. Adjust the Options on the right if you need to. The defaults are listed below.
  5. Press Encode, or ⌘↵.
  6. To go the other way, press Swap or ⌘S. The output moves into the input.
  7. Use Copy or ⇧⌘C to copy the result. ⌘L clears everything.

Options

OptionValuesDefault
MIME TypeContent MIME typeAuto-detect, text/plain, text/html, text/css, text/javascript, application/json, image/svg+xml, image/png, image/jpeg, image/gifAuto-detect
Base64 encodeEncode data as Base64 (recommended)On or offOn
CSS url() formatWrap in CSS url() functionOn or offOff

Example

Real output from Devly, with the default options.

Input
Hello, Devly!
data:text/plain;base64,SGVsbG8sIERldmx5IQ==

From Terminal

With the free command-line tool installed:

Terminal
devly datauri "Hello, Devly!"
# or pipe text in
pbpaste | devly datauri

Quick Switch also finds it by: data, uri, url, base64, embed, inline, image.

More Web Dev tools