how to get data url from svg code example Example: css svg data uri .bg { background: url('data:image/svg+xml;utf8,<svg ...> ... </svg>'); }