Web Dev
Data URI
Convert text or data to Data URI format.
How to use it
- Open Devly from the wrench in your menu bar, or press ⌃⌥⌘D. Press ⌘P, type Data URI and press Return.
- Choose Encode or Decode at the top.
- Paste or type your text into Input.
- Adjust the Options on the right if you need to. The defaults are listed below.
- Press Encode, or ⌘↵.
- To go the other way, press Swap or ⌘S. The output moves into the input.
- Use Copy or ⇧⌘C to copy the result. ⌘L clears everything.
Options
| Option | Values | Default |
|---|---|---|
| MIME TypeContent MIME type | Auto-detect, text/plain, text/html, text/css, text/javascript, application/json, image/svg+xml, image/png, image/jpeg, image/gif | Auto-detect |
| Base64 encodeEncode data as Base64 (recommended) | On or off | On |
| CSS url() formatWrap in CSS url() function | On or off | Off |
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.