✏️🔁

NON AI TOOLS

format converter

drop files here
or tap to pick · images, PDF, Word, text, spreadsheets, audio, video · several at once is fine
Word → Google Docs: Google Docs opens .docx files directly. Convert text, Markdown or HTML to DOCX here (Word files already are), then in Google Drive choose New → File upload and open it with Google Docs. Sending straight into your Google account would need a Google sign-in, so this tool doesn't do that.
what converts to what
  • Images (PNG, JPEG, WebP, BMP, GIF first frame, SVG, AVIF, HEIC) → PNG, JPEG, WebP, BMP, PDF
  • PDF → JPEG or PNG (one image per page, zipped when there's more than one), TXT (the text layer)
  • Word .docx → PDF, HTML, TXT, Markdown
  • TXT, Markdown, HTML → DOCX, PDF, HTML / Markdown / TXT
  • Audio (MP3, WAV, OGG, M4A, AAC, FLAC, OPUS) → MP3, WAV, OGG, M4A, FLAC, MP4 (sound over a still picture)
  • Video (MP4, MOV, WebM, MKV, AVI, M4V) → MP4, WebM, GIF (first 15 seconds), MP3, WAV, M4A
  • Data: CSV → JSON, XLSX · JSON → CSV, XLSX · XLSX/XLS/ODS → CSV, JSON (one CSV per sheet)
what it can't do (honestly)
  • PDF → Word: rebuilding a PDF's layout into an editable document needs server-side software. Try PDF → TXT for the words.
  • Old Word .doc (pre-2007), PowerPoint, Pages and Keynote files can't be read in the browser. Save them as .docx or PDF first.
  • Exporting straight into Google Docs needs a Google sign-in (see the note above).
  • Animated GIF → animated anything: images keep only the first frame.
  • PDFs made here from Word/text are rendered as page images, so their text isn't selectable.
  • Audio and video run on a ~30 MB in-browser engine. Long videos are slow, and files over about 1.5 GB won't fit in browser memory.
\n`],{type:MIME.html}); if(t==='txt')return new Blob([htmlToText(html)],{type:MIME.txt}); if(t==='md'){await load('turndown');await load('gfm').catch(()=>{});const td=new TurndownService({headingStyle:'atx',codeBlockStyle:'fenced',bulletListMarker:'-'}); if(window.turndownPluginGfm){td.use(turndownPluginGfm.gfm);td.addRule('cellP',{filter:n=>n.nodeName==='P'&&n.parentNode&&/^T[DH]$/.test(n.parentNode.nodeName),replacement:c=>c.trim()+' '})} td.addRule('img',{filter:'img',replacement:(c,n)=>{const s=n.getAttribute('src')||'';return s.startsWith('data:')?`![${n.alt||'image'}](embedded image removed)`:`![${n.alt||''}](${s})`}}); const dd=new DOMParser().parseFromString(''+html+'','text/html'); dd.querySelectorAll('table').forEach(tb=>{if(tb.querySelector('th'))return;const r=tb.querySelector('tr');if(!r)return;[...r.children].forEach(td=>{const th=dd.createElement('th');th.innerHTML=td.innerHTML;td.replaceWith(th)})}); return new Blob([td.turndown(dd.body.innerHTML)+'\n'],{type:MIME.md})} if(t==='pdf'){await load('html2pdf');prog&&prog(.6); const src=`
${html}
`; return await html2pdf().set({margin:[14,14,14,14],image:{type:'jpeg',quality:.95},html2canvas:{scale:2,useCORS:true,backgroundColor:'#ffffff',logging:false},jsPDF:{unit:'mm',format:'a4',orientation:'portrait'},pagebreak:{mode:['css','legacy']}}).from(src).outputPdf('blob');} if(t==='docx')return await htmlToDocx(html,title); throw new Error('No converter for this combination.'); } async function htmlToDocx(html,title){ await load('docx');const D=window.docx; const body=new DOMParser().parseFromString(''+html+'','text/html').body; const BLOCK=/^(P|DIV|H[1-6]|UL|OL|LI|PRE|BLOCKQUOTE|TABLE|HR|SECTION|ARTICLE|MAIN|HEADER|FOOTER|ASIDE|NAV|FIGURE|FIGCAPTION|DL|DT|DD|ADDRESS|CENTER)$/; let olInst=0; function runs(node,fm){const out=[];for(const c of node.childNodes){ if(c.nodeType===3){const t=fm.pre?c.textContent:c.textContent.replace(/\s+/g,' ');if(!t)continue; if(fm.pre){t.split('\n').forEach((ln,i)=>out.push(new D.TextRun({text:ln,break:i?1:0,font:'Courier New',size:20})))} else out.push(new D.TextRun({text:t,bold:fm.b,italics:fm.i,underline:fm.u?{}:undefined,strike:fm.s,font:fm.code?'Courier New':undefined,color:fm.link?'1155CC':undefined,superScript:fm.sup,subScript:fm.sub}));continue} if(c.nodeType!==1)continue;const tg=c.tagName,f={...fm}; if(tg==='BR'){out.push(new D.TextRun({text:'',break:1}));continue} if(tg==='IMG'||tg==='SCRIPT'||tg==='STYLE')continue; if(tg==='B'||tg==='STRONG'||tg==='TH')f.b=true;if(tg==='I'||tg==='EM')f.i=true;if(tg==='U'||tg==='INS')f.u=true; if(tg==='S'||tg==='DEL'||tg==='STRIKE')f.s=true;if(tg==='CODE'||tg==='KBD'||tg==='TT'||tg==='SAMP')f.code=true; if(tg==='SUP')f.sup=true;if(tg==='SUB')f.sub=true; if(tg==='A'&&c.getAttribute('href')&&/^https?:|^mailto:/.test(c.getAttribute('href'))){f.link=true;f.u=true;out.push(new D.ExternalHyperlink({link:c.getAttribute('href'),children:runs(c,f)}));continue} out.push(...runs(c,f))}return out} function blocks(node,ctx){const out=[];let inl=[]; const flush=()=>{if(inl.some(n=>n.nodeType===1||n.textContent.trim())){const w=document.createElement('span');inl.forEach(n=>w.appendChild(n.cloneNode(true)));out.push(para(w,ctx))}inl=[]}; for(const c of [...node.childNodes]){ if(c.nodeType===1&&BLOCK.test(c.tagName)){flush();const tg=c.tagName; if(/^H[1-6]$/.test(tg))out.push(new D.Paragraph({heading:D.HeadingLevel['HEADING_'+tg[1]],children:runs(c,{})})); else if(tg==='UL'||tg==='OL'){const inst=tg==='OL'?++olInst:0; for(const li of c.children){if(li.tagName!=='LI')continue;const sub=[...li.children].filter(x=>x.tagName==='UL'||x.tagName==='OL'); const clone=li.cloneNode(true);clone.querySelectorAll(':scope>ul,:scope>ol').forEach(x=>x.remove()); const lvl=Math.min(ctx.level||0,3); const innerBlocks=[...clone.children].some(x=>BLOCK.test(x.tagName)); const target=innerBlocks?(clone.querySelector('p')||clone):clone; out.push(new D.Paragraph({children:runs(target,{}),...(tg==='UL'?{bullet:{level:lvl}}:{numbering:{reference:'ol',level:lvl,instance:inst}})})); sub.forEach(s=>{const w=document.createElement('div');w.appendChild(s.cloneNode(true));out.push(...blocks(w,{...ctx,level:(ctx.level||0)+1}))})}} else if(tg==='PRE')out.push(new D.Paragraph({children:runs(c,{pre:true}),shading:{fill:'F2F2F2'}})); else if(tg==='HR')out.push(new D.Paragraph({border:{bottom:{color:'999999',space:1,style:D.BorderStyle.SINGLE,size:6}},children:[]})); else if(tg==='TABLE'){const rows=[...c.querySelectorAll('tr')].filter(r=>r.closest('table')===c); const cols=Math.max(1,...rows.map(r=>r.children.length)); if(rows.length)out.push(new D.Table({width:{size:100,type:D.WidthType.PERCENTAGE},rows:rows.map(r=>new D.TableRow({children:[...r.children].concat(Array(cols-r.children.length).fill(null)).map(td=>new D.TableCell({children:[td?para(td,{}):new D.Paragraph('')]}))}))}))} else if(tg==='BLOCKQUOTE')out.push(...blocks(c,{...ctx,quote:true})); else if(tg==='P'||![...c.children].some(x=>BLOCK.test(x.tagName)))out.push(para(c,ctx)); else out.push(...blocks(c,ctx)); }else inl.push(c)} flush();return out} function para(el,ctx){return new D.Paragraph({children:runs(el,{i:!!ctx.quote}),indent:ctx.quote?{left:720}:undefined,alignment:el.style&&el.style.textAlign==='center'?D.AlignmentType.CENTER:undefined})} let children=blocks(body,{});if(!children.length)children=[new D.Paragraph('')]; const doc=new D.Document({creator:'Non Ai Tools',title, styles:{default:{document:{run:{font:'Calibri',size:22}}}}, numbering:{config:[{reference:'ol',levels:[0,1,2,3].map(l=>({level:l,format:D.LevelFormat.DECIMAL,text:`%${l+1}.`,alignment:D.AlignmentType.START,style:{paragraph:{indent:{left:720*(l+1),hanging:360}}}}))}]}, sections:[{children}]}); return await D.Packer.toBlob(doc); } /* ---------- data ---------- */ function parseCSV(text,delim){ text=text.replace(/^\uFEFF/,''); if(!delim){const first=text.split(/\r?\n/)[0]||'';const c={',':0,';':0,'\t':0};for(const ch of first)if(ch in c)c[ch]++;delim=Object.keys(c).reduce((a,b)=>c[b]>c[a]?b:a,',')} const rows=[];let row=[],f='',q=false; for(let i=0;ix===''))rows.pop(); if(q)throw new Error('This CSV has an unclosed quote, so it can\'t be read reliably.'); return rows; } const num=s=>/^-?(0|[1-9]\d*)(\.\d+)?([eE][-+]?\d+)?$/.test(s)?Number(s):s; const csvCell=v=>{if(v==null)return'';if(typeof v==='object')v=JSON.stringify(v);v=String(v);return /[",\n\r]/.test(v)?'"'+v.replace(/"/g,'""')+'"':v}; function jsonRows(data){ if(data&&!Array.isArray(data)&&typeof data==='object'){const arr=Object.values(data).filter(Array.isArray);data=arr.length===1?arr[0]:[data]} if(!Array.isArray(data))throw new Error('This JSON is a single value, not a list of records, so it can\'t become a table.'); if(data.every(Array.isArray))return data; const keys=[];data.forEach(o=>{if(o&&typeof o==='object')Object.keys(o).forEach(k=>{if(!keys.includes(k))keys.push(k)})}); if(!keys.length)return data.map(v=>[v]); return[keys,...data.map(o=>keys.map(k=>o&&typeof o==='object'?o[k]:''))]; } async function dataConvert(f,ext,t){ if(ext==='csv'||ext==='tsv'){const rows=parseCSV(await f.text(),ext==='tsv'?'\t':null);if(!rows.length)throw new Error('This file is empty.'); if(t==='csv')return new Blob([rows.map(r=>r.map(csvCell).join(',')).join('\r\n')+'\r\n'],{type:MIME.csv}); if(t==='json'){const head=rows[0].map((h,i)=>h.trim()||'column_'+(i+1));const seen={};head.forEach((h,i)=>{if(seen[h])head[i]=h+'_'+(++seen[h]);else seen[h]=1}); const objs=rows.slice(1).map(r=>Object.fromEntries(head.map((h,i)=>[h,num(r[i]??'')])));return new Blob([JSON.stringify(objs,null,2)+'\n'],{type:MIME.json})} await load('xlsx');const wb=XLSX.utils.book_new();XLSX.utils.book_append_sheet(wb,XLSX.utils.aoa_to_sheet(rows.map(r=>r.map(num))),'Sheet1'); return new Blob([XLSX.write(wb,{bookType:'xlsx',type:'array'})],{type:MIME.xlsx})} if(ext==='json'){let data;try{data=JSON.parse(await f.text())}catch(e){throw new Error('This isn\'t valid JSON: '+e.message)} const rows=jsonRows(data); if(t==='csv')return new Blob([rows.map(r=>r.map(csvCell).join(',')).join('\r\n')+'\r\n'],{type:MIME.csv}); await load('xlsx');const wb=XLSX.utils.book_new();XLSX.utils.book_append_sheet(wb,XLSX.utils.aoa_to_sheet(rows.map(r=>r.map(v=>v&&typeof v==='object'?JSON.stringify(v):v))),'Sheet1'); return new Blob([XLSX.write(wb,{bookType:'xlsx',type:'array'})],{type:MIME.xlsx})} await load('xlsx');let wb;try{wb=XLSX.read(await f.arrayBuffer(),{type:'array',cellDates:true})}catch(e){throw new Error('This spreadsheet couldn\'t be read ('+e.message+').')} if(t==='xlsx')return new Blob([XLSX.write(wb,{bookType:'xlsx',type:'array'})],{type:MIME.xlsx}); if(t==='json'){const o={};wb.SheetNames.forEach(n=>o[n]=XLSX.utils.sheet_to_json(wb.Sheets[n],{defval:''})); return new Blob([JSON.stringify(wb.SheetNames.length===1?o[wb.SheetNames[0]]:o,null,2)+'\n'],{type:MIME.json})} if(wb.SheetNames.length===1)return new Blob([XLSX.utils.sheet_to_csv(wb.Sheets[wb.SheetNames[0]])],{type:MIME.csv}); await load('jszip');const z=new JSZip();wb.SheetNames.forEach(n=>z.file(n.replace(/[\\/:*?"<>|]/g,'_')+'.csv',XLSX.utils.sheet_to_csv(wb.Sheets[n]))); const blob=await z.generateAsync({type:'blob'});blob.zipOverride=true;return blob; } /* ---------- audio / video (ffmpeg.wasm) ---------- */ let ff=null,ffLoading=null,ffLog=[]; async function getFF(msg){ if(ff)return ff; if(!ffLoading)ffLoading=(async()=>{ note('loading converter (about 30 MB, first time only)…','warn'); await load('ffmpeg');await load('ffutil'); const{FFmpeg}=FFmpegWASM;const f=new FFmpeg(); f.on('log',({message})=>{ffLog.push(message);if(ffLog.length>200)ffLog.shift()}); const coreURL=await FFmpegUtil.toBlobURL(CDN.ffcore+'/ffmpeg-core.js','text/javascript'); const wasmURL=await fetchProgress(CDN.ffcore+'/ffmpeg-core.wasm','application/wasm',p=>{note(`loading converter (about 30 MB, first time only)… ${Math.round(p*100)}%`,'warn');msg&&msg(`loading converter… ${Math.round(p*100)}%`)}); await f.load({coreURL,wasmURL});note('converter ready','good');ff=f;return f})().catch(e=>{ffLoading=null;note('The audio/video converter couldn\'t load. Check your connection and try again.','bad');throw e}); return ffLoading; } async function fetchProgress(url,type,cb){ const r=await fetch(url);if(!r.ok)throw new Error('Download failed ('+r.status+')'); const total=+r.headers.get('content-length')||32e6,reader=r.body.getReader(),parts=[];let got=0; for(;;){const{done,value}=await reader.read();if(done)break;parts.push(value);got+=value.length;cb(Math.min(got/total,1))} return URL.createObjectURL(new Blob(parts,{type})); } async function coverPng(title){ const pickd=$('coverMode').value==='pick'&&$('cover').files[0]; const c=document.createElement('canvas');c.width=1280;c.height=720;const x=c.getContext('2d'); if(pickd){const{img,w,h}=await decodeImage(pickd,detect(pickd).ext);x.fillStyle='#1c2a22';x.fillRect(0,0,1280,720);const s=Math.min(1280/w,720/h);x.drawImage(img,(1280-w*s)/2,(720-h*s)/2,w*s,h*s)} else{x.fillStyle='#ece6da';x.fillRect(0,0,1280,720);x.fillStyle='#1c2a22';x.fillRect(40,40,1200,640); try{await document.fonts.load('700 64px "Cabin Sketch"');await document.fonts.load('32px "Patrick Hand"')}catch(e){} x.textAlign='center';x.fillStyle='#f1ede3';x.font='700 64px "Cabin Sketch", cursive'; let t=title;while(x.measureText(t).width>1100&&t.length>4)t=t.slice(0,-2);if(t!==title)t=t.slice(0,-1)+'…'; x.fillText('♪ '+t,640,350);x.fillStyle='#e2b94c';x.font='32px "Patrick Hand", cursive';x.fillText('non ai tools',640,430)} const b=await canvasBlob(c,'image/png');return new Uint8Array(await b.arrayBuffer()); } function audioLength(file){return new Promise(res=>{const a=document.createElement('audio'),u=URL.createObjectURL(file);const done=v=>{URL.revokeObjectURL(u);res(v)}; a.preload='metadata';a.onloadedmetadata=()=>done(isFinite(a.duration)&&a.duration>0?a.duration:0);a.onerror=()=>done(0);setTimeout(()=>done(0),4000);a.src=u})} async function mediaConvert(it,t,prog,msg){ const f=await getFF(msg);msg('converting… (this runs on your device, long files take a while)'); const inName='in.'+(it.ext||'bin'),outName='out.'+t; await f.writeFile(inName,new Uint8Array(await it.file.arrayBuffer())); const A={mp3:['-c:a','libmp3lame','-b:a','192k'],wav:['-c:a','pcm_s16le'],ogg:['-c:a','libvorbis','-q:a','5'],m4a:['-c:a','aac','-b:a','192k'],flac:['-c:a','flac']}; let args; if(A[t])args=['-i',inName,'-vn',...A[t],outName]; else if(it.kind==='audio'&&t==='mp4'){await f.writeFile('cover.png',await coverPng(base(it.file.name))); const len=await audioLength(it.file); args=[...(len?['-t',len.toFixed(3)]:[]),'-loop','1','-framerate','2','-i','cover.png','-i',inName,'-map','0:v','-map','1:a','-c:v','libx264','-preset','ultrafast','-tune','stillimage','-pix_fmt','yuv420p','-vf','scale=trunc(iw/2)*2:trunc(ih/2)*2','-r','2','-c:a','aac','-b:a','192k','-shortest','-movflags','+faststart',outName]} else if(t==='mp4')args=['-i',inName,'-c:v','libx264','-preset','ultrafast','-crf','23','-pix_fmt','yuv420p','-vf','scale=trunc(iw/2)*2:trunc(ih/2)*2','-c:a','aac','-b:a','160k','-movflags','+faststart',outName]; else if(t==='webm')args=['-i',inName,'-c:v','libvpx','-deadline','realtime','-cpu-used','8','-b:v','1500k','-c:a','libvorbis','-q:a','4',outName]; else if(t==='gif')args=['-t','15','-i',inName,'-vf','fps=10,scale=480:-2:flags=lanczos,split[a][b];[a]palettegen[p];[b][p]paletteuse','-loop','0',outName]; else throw new Error('No converter for this combination.'); ffLog=[];let dur=0; const onLog=({message})=>{let m=/Duration: (\d+):(\d+):([\d.]+)/.exec(message);if(m){const d=+m[1]*3600+ +m[2]*60+ +m[3];dur=Math.max(dur,d)} m=/time=(\d+):(\d+):([\d.]+)/.exec(message);if(m&&dur){const s=+m[1]*3600+ +m[2]*60+ +m[3];prog(Math.min(.98,s/(t==='gif'?Math.min(dur,15):dur)))}}; f.on('log',onLog); let code;try{code=await f.exec(args)}finally{f.off('log',onLog)} let data=null;try{data=await f.readFile(outName)}catch(e){} for(const n of[inName,outName,'cover.png'])try{await f.deleteFile(n)}catch(e){} if(code!==0||!data||!data.length){ const tail=ffLog.filter(l=>/error|invalid|not|unsupported|no such/i.test(l)).slice(-2).join(' · '); if(/does not contain any stream|matches no streams|Output file #0 does not contain/i.test(ffLog.join('\n')))throw new Error('This file has no '+(t==='gif'||t==='mp4'||t==='webm'?'video':'audio')+' track to convert.'); throw new Error('The converter couldn\'t process this file'+(tail?': '+tail.slice(0,200):'.')); } return new Blob([data.buffer],{type:MIME[t]}); }