Search notes:

Data URLs

data:                   ,<data>
data: <mediatype>       ,<data>
data:             base64,<data>
data: <mediatype>;base64,<data>
mediatype is a MIME type string. If omitted, the value defaults to text/plain;charset:US-ASCII.
Special characters (reserved characters as defined RFC 3986) in <data> must be percent encoded.

Creating data URLs with PowerShell

PS> add-type -assemblyName System.Web
PS> $dataUrl = 'data:,' + [System.Web.HttpUtility]::UrlEncode("Rene says:`nHello World!")
PS> start-process chrome $dataUrl
Making sure that the right encoding is specified (Note the acute accent on René):
PS> $dataUrl = 'data:text/plain;charset=UTF-8,' + [System.Web.HttpUtility]::UrlEncode("René says:`nHello World!")
PS> start-process chrome $dataUrl
Using Base64, for example to decode an image:
PS> $pngBase64 = [Convert]::ToBase64String([IO.File]::ReadAllBytes('C:\Windows\System32\@WLOGO_48x48.png'))
PS> $dataUrl = 'data:image/png;base64,' + $pngBase64
PS> start-process chrome $dataUrl
(Mis-)use a browser as an editor:
PS> start-process chrome 'data:text/html,<html%20contenteditable>'

Index