<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Khoa Nguyen</title>
    <description>The latest articles on DEV Community by Khoa Nguyen (@khoanna).</description>
    <link>https://dev.to/khoanna</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3862592%2F78880c9e-1e94-4087-ad23-5cb1fd8976b5.jpeg</url>
      <title>DEV Community: Khoa Nguyen</title>
      <link>https://dev.to/khoanna</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/khoanna"/>
    <language>en</language>
    <item>
      <title>I replaced a $200/month audio processing server with 40 lines of browser JavaScript</title>
      <dc:creator>Khoa Nguyen</dc:creator>
      <pubDate>Tue, 19 May 2026 14:37:07 +0000</pubDate>
      <link>https://dev.to/khoanna/i-replaced-a-200month-audio-processing-server-with-40-lines-of-browser-javascript-56ef</link>
      <guid>https://dev.to/khoanna/i-replaced-a-200month-audio-processing-server-with-40-lines-of-browser-javascript-56ef</guid>
      <description>&lt;p&gt;Last year I was paying $200/month for an EC2 instance that did one thing: accept audio file uploads, run FFmpeg, and return the converted file. FLAC to MP3. WAV to OGG. Bitrate changes. Speed adjustments.&lt;/p&gt;

&lt;p&gt;The server handled maybe 2,000 conversions per day. Most files were under 20 MB. The actual FFmpeg processing took 2-4 seconds per file. The upload and download took longer than the conversion itself.&lt;/p&gt;

&lt;p&gt;I replaced the entire thing with client-side JavaScript. Here's how, and where the approach breaks down.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Web Audio API is more capable than you think
&lt;/h2&gt;

&lt;p&gt;Most developers know the Web Audio API as "the thing that plays sounds in games." It's actually a full audio processing pipeline with decode, transform, and encode capabilities.&lt;/p&gt;

&lt;p&gt;The key insight: if the browser can &lt;em&gt;play&lt;/em&gt; a format, it can &lt;em&gt;decode&lt;/em&gt; it. And if it can decode it, you can re-encode it into any format the browser supports for encoding.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;convertAudio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;targetFormat&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;audio/mp3&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;bitrate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;192000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;audioContext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;OfflineAudioContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;44100&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;arrayBuffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;arrayBuffer&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;audioBuffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;audioContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decodeAudioData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arrayBuffer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Now audioBuffer contains raw PCM samples&lt;/span&gt;
  &lt;span class="c1"&gt;// We can re-encode to any supported format&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;encoded&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;encodeAudio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;audioBuffer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;targetFormat&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;bitrate&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Blob&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;encoded&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;targetFormat&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;decodeAudioData&lt;/code&gt; handles FLAC, WAV, OGG, MP3, AAC, and WebM audio in all modern browsers. You get back raw PCM samples regardless of the input format. From there, encoding is a separate step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Encoding with AudioEncoder (WebCodecs API)
&lt;/h2&gt;

&lt;p&gt;The WebCodecs API landed in Chrome 94 and is now available in all Chromium-based browsers and Firefox. It gives you direct access to hardware-accelerated audio encoders.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;encodeToMp3&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;audioBuffer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;bitrate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;192000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;numberOfChannels&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;audioBuffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;numberOfChannels&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sampleRate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;audioBuffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sampleRate&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;frames&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;encoder&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;AudioEncoder&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;buffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ArrayBuffer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;byteLength&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;copyTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nx"&gt;frames&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Encode error:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="nx"&gt;encoder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;configure&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;codec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;mp3&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;numberOfChannels&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;sampleRate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;bitrate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="c1"&gt;// Feed PCM data in chunks&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chunkSize&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1152&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// MP3 frame size&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;totalSamples&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;audioBuffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;offset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;offset&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;totalSamples&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;offset&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;chunkSize&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;frameCount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunkSize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;totalSamples&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;offset&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Float32Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;frameCount&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;numberOfChannels&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;ch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;ch&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;numberOfChannels&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;ch&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;channelData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;audioBuffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getChannelData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ch&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;frameCount&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;numberOfChannels&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;ch&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;channelData&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;offset&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;audioData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;AudioData&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;format&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;f32-planar&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;sampleRate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;numberOfFrames&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;frameCount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;numberOfChannels&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;offset&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;sampleRate&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="nx"&gt;_000_000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="nx"&gt;encoder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;audioData&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;audioData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;encoder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;flush&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nx"&gt;encoder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;concatenateBuffers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;frames&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This runs at near-native speed because it uses the platform's hardware encoder. On my M2 MacBook, a 5-minute FLAC file (50 MB) converts to 192kbps MP3 in about 1.8 seconds. The same file took 2.1 seconds on the EC2 instance, plus 8 seconds of upload time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fallback: FFmpeg.wasm for Safari
&lt;/h2&gt;

&lt;p&gt;Safari's WebCodecs support for audio encoding is still incomplete as of early 2026. For Safari users, FFmpeg.wasm is the fallback:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;convertWithFFmpeg&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;outputFormat&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;mp3&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;bitrate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;192k&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;FFmpeg&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@ffmpeg/ffmpeg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;toBlobURL&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@ffmpeg/util&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ffmpeg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;FFmpeg&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ffmpeg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;coreURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;toBlobURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/ffmpeg-core.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text/javascript&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;wasmURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;toBlobURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/ffmpeg-core.wasm&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/wasm&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;inputName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;input&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;getExtension&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ffmpeg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;inputName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Uint8Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;arrayBuffer&lt;/span&gt;&lt;span class="p"&gt;()));&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ffmpeg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;-i&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;inputName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;-b:a&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;bitrate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;-map&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;`output.&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;outputFormat&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;]);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;ffmpeg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`output.&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;outputFormat&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Blob&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`audio/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;outputFormat&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The initial FFmpeg.wasm load is ~30 MB (cached after first use). After that, conversions run at roughly 60-70% of native FFmpeg speed. Still faster than uploading to a server for files under 100 MB.&lt;/p&gt;

&lt;h2&gt;
  
  
  Audio compression without quality loss
&lt;/h2&gt;

&lt;p&gt;Audio compression (reducing file size, not dynamic range) is mostly about bitrate selection. The perceptual quality curve for MP3 looks like this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Bitrate&lt;/th&gt;
&lt;th&gt;File size (5 min)&lt;/th&gt;
&lt;th&gt;Perceptual quality&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;64 kbps&lt;/td&gt;
&lt;td&gt;2.4 MB&lt;/td&gt;
&lt;td&gt;Noticeable artifacts, AM radio quality&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;128 kbps&lt;/td&gt;
&lt;td&gt;4.8 MB&lt;/td&gt;
&lt;td&gt;Acceptable for speech, podcasts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;192 kbps&lt;/td&gt;
&lt;td&gt;7.2 MB&lt;/td&gt;
&lt;td&gt;Transparent for most listeners&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;256 kbps&lt;/td&gt;
&lt;td&gt;9.6 MB&lt;/td&gt;
&lt;td&gt;Indistinguishable from source for 99% of people&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;320 kbps&lt;/td&gt;
&lt;td&gt;12 MB&lt;/td&gt;
&lt;td&gt;Placebo territory&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For podcasts and voice content, 128 kbps mono is the sweet spot. For music, 192 kbps stereo is where most listeners cannot distinguish from the FLAC source in blind tests. Going above 256 kbps is measurably identical to the source on consumer equipment.&lt;/p&gt;

&lt;p&gt;The practical implication: a 50 MB FLAC file becomes a 7 MB MP3 at 192 kbps with no audible difference. That's a 7x reduction with zero perceptual cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  Speed change without pitch shift
&lt;/h2&gt;

&lt;p&gt;Changing audio playback speed while preserving pitch is a time-stretching problem. The Web Audio API has a built-in solution:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;changeSpeed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;audioBuffer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;speedFactor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;newLength&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;audioBuffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;speedFactor&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;offlineCtx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;OfflineAudioContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;audioBuffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;numberOfChannels&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;newLength&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;audioBuffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sampleRate&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;offlineCtx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createBufferSource&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;buffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;audioBuffer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;playbackRate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;speedFactor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;offlineCtx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;destination&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;offlineCtx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startRendering&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;playbackRate&lt;/code&gt; with &lt;code&gt;OfflineAudioContext&lt;/code&gt; renders the speed-adjusted audio to a new buffer without pitch artifacts. The browser's internal resampler handles the time-stretching. Quality is comparable to SoX or Audacity's default algorithm.&lt;/p&gt;

&lt;p&gt;This is how I built the &lt;a href="https://brevtool.com/audio-tools/audio-speed-changer" rel="noopener noreferrer"&gt;audio speed changer&lt;/a&gt; on my site. Users upload a file, pick a speed (0.5x to 3x), and download the result. The entire operation runs in the browser in under 2 seconds for a typical podcast episode.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this breaks down
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Files over 500 MB.&lt;/strong&gt; The Web Audio API loads the entire decoded PCM into memory. A 60-minute FLAC at 44.1kHz stereo is ~600 MB of raw PCM. On mobile devices with 3-4 GB of browser memory, this causes crashes. For large files, you need chunked processing with &lt;code&gt;AudioDecoder&lt;/code&gt; (WebCodecs) instead of &lt;code&gt;decodeAudioData&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exotic formats.&lt;/strong&gt; The browser can decode what it can play. Formats like APE, WV (WavPack), and DSD are not supported. For these, FFmpeg.wasm is the only browser-side option.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Safari audio encoding.&lt;/strong&gt; As mentioned, Safari's &lt;code&gt;AudioEncoder&lt;/code&gt; support is incomplete. You need the FFmpeg.wasm fallback or accept that ~15% of users get a slower path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Batch processing.&lt;/strong&gt; Converting 50 files sequentially in a browser tab is technically possible but UX-hostile. Users expect to close the tab. For batch workloads, a server (or at minimum a service worker with Background Fetch) is still the right architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  The economics
&lt;/h2&gt;

&lt;p&gt;My old setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;t3.medium EC2: $30/month&lt;/li&gt;
&lt;li&gt;EBS storage for temp files: $10/month&lt;/li&gt;
&lt;li&gt;Data transfer (uploads + downloads): $80-150/month&lt;/li&gt;
&lt;li&gt;CloudFront for delivery: $20/month&lt;/li&gt;
&lt;li&gt;Total: ~$200/month for 2,000 conversions/day&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My current setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Static hosting on Cloudflare Pages: $0&lt;/li&gt;
&lt;li&gt;Total: $0/month for unlimited conversions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The conversion moved from my bill to the user's CPU. But the user's experience is &lt;em&gt;better&lt;/em&gt; because there's no upload wait, no queue, and no "your file is being processed" spinner. The 8-second upload that used to precede every conversion is gone.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd build differently today
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start with WebCodecs, fall back to FFmpeg.wasm.&lt;/strong&gt; I did it the other way around and had to refactor when WebCodecs matured.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use &lt;code&gt;AudioDecoder&lt;/code&gt; for large files from day one.&lt;/strong&gt; Streaming decode avoids the memory cliff that &lt;code&gt;decodeAudioData&lt;/code&gt; hits at ~500 MB.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Show a progress bar based on samples processed.&lt;/strong&gt; The Web Audio API doesn't give you progress events, but you can calculate it from the chunk offset in the encoding loop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test on Android Chrome early.&lt;/strong&gt; Mobile Chromium has lower memory limits and some WebCodecs codecs are software-only (no hardware acceleration). Performance is 2-3x slower than desktop.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The browser audio stack in 2026 is production-ready for the vast majority of consumer audio processing tasks. If you're still routing audio files through a server for format conversion, compression, or speed adjustment, you're paying for infrastructure that delivers a worse user experience than the zero-infrastructure alternative.&lt;/p&gt;




&lt;p&gt;I built all of this into &lt;a href="https://brevtool.com/audio-tools/audio-format-converter" rel="noopener noreferrer"&gt;a set of free browser-based audio tools&lt;/a&gt; — FLAC to MP3, audio compression, speed change, trimming, noise removal. No upload, no signup, no watermark. The patterns above are what's running in production.&lt;/p&gt;

&lt;p&gt;Happy to answer questions about specific codec support or edge cases in the comments.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>audio</category>
      <category>performance</category>
    </item>
    <item>
      <title>I stopped paying for 6 different online tools. Here's the one free site I use now.</title>
      <dc:creator>Khoa Nguyen</dc:creator>
      <pubDate>Tue, 12 May 2026 09:23:38 +0000</pubDate>
      <link>https://dev.to/khoanna/i-stopped-paying-for-6-different-online-tools-heres-the-one-free-site-i-use-now-2ocf</link>
      <guid>https://dev.to/khoanna/i-stopped-paying-for-6-different-online-tools-heres-the-one-free-site-i-use-now-2ocf</guid>
      <description>&lt;p&gt;Running a small business means juggling a dozen subscriptions you barely use. $10/mo for a PDF editor. $8/mo for an image resizer. $12/mo for a video trimmer. It adds up fast — and most of us only use 10% of the features.&lt;/p&gt;

&lt;p&gt;A few months ago I found &lt;a href="//brevtool.com"&gt;brevtool.com&lt;/a&gt; and it replaced almost all of them. It's a free website with 86 browser-based tools — and I mean actually free. No "free trial." No credit card. No account needed.&lt;/p&gt;

&lt;p&gt;Here's what I use it for every week:&lt;/p&gt;

&lt;p&gt;📄 &lt;strong&gt;PDF tools&lt;/strong&gt; — Merge contracts, split invoices, compress PDFs before emailing clients. I used to pay for SmallPDF.&lt;br&gt;
dev&lt;br&gt;
🖼️ &lt;strong&gt;Image tools&lt;/strong&gt; — Resize product photos for social media, compress images for my website (page speed matters for SEO), convert between formats. Replaced my Canva Pro image exports and TinyPNG subscription.&lt;/p&gt;

&lt;p&gt;🎬 &lt;strong&gt;Video editor&lt;/strong&gt; — Trim and cut clips for Instagram Reels and TikTok. Basic editing without installing anything. No watermark on exports.&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;QR code generator&lt;/strong&gt; — I print QR codes on business cards, flyers, and packaging. Used to use a paid QR service.&lt;/p&gt;

&lt;p&gt;🧮 &lt;strong&gt;Business calculators&lt;/strong&gt; — Loan calculator, percentage calculator, unit converters. Small things, but I use them constantly.&lt;/p&gt;

&lt;p&gt;🔧 &lt;strong&gt;Dev/text tools&lt;/strong&gt; — JSON formatter, word counter, case converter, Base64 encoder. If you manage a website yourself, these save time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The thing that sold me:&lt;/strong&gt; everything runs inside your browser. Your files never get uploaded to anyone's server. For someone who handles client contracts and sensitive business documents, that matters. I don't want my NDAs sitting on some random company's cloud.&lt;/p&gt;

&lt;p&gt;It's not perfect — the video editor is basic compared to CapCut or Premiere. But for quick social media clips and everyday business tasks? It handles 90% of what I need at 0% of the cost.&lt;/p&gt;

&lt;p&gt;If you're bootstrapping or just tired of death-by-subscription, bookmark this one: &lt;a href="//brevtool.com"&gt;brevtool.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What free tools have saved you the most money in your business? I'm always looking to trim more subscriptions. 👇&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>privacy</category>
      <category>performance</category>
    </item>
    <item>
      <title>I shipped 122 web tools without a backend</title>
      <dc:creator>Khoa Nguyen</dc:creator>
      <pubDate>Thu, 07 May 2026 01:47:08 +0000</pubDate>
      <link>https://dev.to/khoanna/i-shipped-122-web-tools-without-a-backend-1ghf</link>
      <guid>https://dev.to/khoanna/i-shipped-122-web-tools-without-a-backend-1ghf</guid>
      <description>&lt;p&gt;A year ago I deleted my server bill.&lt;/p&gt;

&lt;p&gt;Not because I was broke. Because I realized that for the kind of tools I was building — file converters, formatters, calculators, generators — the server was the worst part of the architecture. It cost money, it leaked user data, it added latency, and it was the single biggest reason competitors in the space charge $9.99/month for a feature that could run in 3KB of JavaScript.&lt;/p&gt;

&lt;p&gt;So I deleted it. Then I built &lt;a href="https://brevtool.com" rel="noopener noreferrer"&gt;122 browser-based tools&lt;/a&gt; on top of that decision. Here's what actually worked, what didn't, and why I think every dev should be re-evaluating the "we'll just spin up a Lambda" reflex.&lt;/p&gt;

&lt;h2&gt;
  
  
  The thesis
&lt;/h2&gt;

&lt;p&gt;Every file you upload to a SaaS converter is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sent over the network (slow)&lt;/li&gt;
&lt;li&gt;Processed on someone's server (expensive)&lt;/li&gt;
&lt;li&gt;Stored, even briefly (privacy risk)&lt;/li&gt;
&lt;li&gt;Returned to you (slow again)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For ~80% of common tools, &lt;strong&gt;none of those steps need to happen&lt;/strong&gt;. The browser in 2026 can do it. Not "kind of," not "with limitations" — actually do it, often faster than the round-trip to a server.&lt;/p&gt;

&lt;p&gt;The mental shift: stop thinking of the browser as a thin client.&lt;/p&gt;

&lt;h2&gt;
  
  
  What worked surprisingly well
&lt;/h2&gt;

&lt;h3&gt;
  
  
  WebAssembly for "real" file processing
&lt;/h3&gt;

&lt;p&gt;Every PDF tool I shipped runs in the browser via WASM. PDF compression, merging, splitting, conversion — all of it. The wins:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Pseudocode for the pattern that replaced our backend&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;files&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;arrayBuffer&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;wasmModule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;compress&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;quality&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.7&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nf"&gt;download&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;compressed.pdf&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. No upload. No queue. No "your file is being processed." A 50MB PDF compresses in ~2 seconds on a mid-range laptop, faster than uploading it to a server would take.&lt;/p&gt;

&lt;p&gt;The same pattern works for image compression, video trimming (with FFmpeg.wasm), audio conversion, and even some surprising things like ZIP creation and EPUB generation.&lt;/p&gt;

&lt;p&gt;If you're still routing files through a server for compression or format conversion, you are paying real money to deliver a worse experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pure-JS for the boring 80%
&lt;/h3&gt;

&lt;p&gt;Most "tools" don't need WASM. Most don't even need a framework. A &lt;a href="https://brevtool.com/developer-tools/json-formatter" rel="noopener noreferrer"&gt;JSON formatter&lt;/a&gt;, a &lt;a href="https://brevtool.com/developer-tools/regex-tester" rel="noopener noreferrer"&gt;regex tester&lt;/a&gt;, a &lt;a href="https://brevtool.com/text-tools/character-counter" rel="noopener noreferrer"&gt;character counter&lt;/a&gt;, a &lt;a href="https://brevtool.com/text-tools/text-case-converter" rel="noopener noreferrer"&gt;text case converter&lt;/a&gt; — these are 50–200 lines of plain JavaScript. The tool is the value. The framework is overhead.&lt;/p&gt;

&lt;p&gt;I tried Vue. I tried plain HTML. I ended up on Next.js for SEO reasons (more on that below), but each tool's actual logic is a single function. Don't over-engineer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Web Workers for anything &amp;gt;200ms
&lt;/h3&gt;

&lt;p&gt;The single biggest UX upgrade across the whole site came from one rule: &lt;strong&gt;if a computation takes more than 200ms, it goes in a worker.&lt;/strong&gt; Otherwise the page freezes during processing and people think the tool is broken.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;worker&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Worker&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./hash.worker.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="nx"&gt;worker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;postMessage&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;algorithm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sha256&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;worker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onmessage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;updateUI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hashing a 1GB file on the main thread → frozen tab → user closes it. Hashing the same file in a worker with progress events → smooth experience, user trusts the tool. Same code, ten times the perceived quality.&lt;/p&gt;

&lt;h2&gt;
  
  
  What didn't work
&lt;/h2&gt;

&lt;h3&gt;
  
  
  "Just ship 122 tools and the SEO will come"
&lt;/h3&gt;

&lt;p&gt;This was wrong. I shipped them, they got indexed (264 pages eventually), and Google parked the entire site at average position 72 for months. Indexed ≠ ranking.&lt;/p&gt;

&lt;p&gt;The fix wasn't more tools. It was &lt;strong&gt;fewer, better-linked, better-content tool pages&lt;/strong&gt;. Each tool now has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A unique H1 with the actual keyword&lt;/li&gt;
&lt;li&gt;A "How it works" section explaining the in-browser processing&lt;/li&gt;
&lt;li&gt;An FAQ targeting common variations of the search query&lt;/li&gt;
&lt;li&gt;3–5 internal links to related tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Average position is finally moving. Lesson: SEO for tool sites is content + authority, not tool count.&lt;/p&gt;

&lt;h3&gt;
  
  
  Building everything from scratch
&lt;/h3&gt;

&lt;p&gt;I tried to write a custom WASM PDF library. It took two weeks. PDF-lib already existed and was better. I wrote a video trimmer in raw WebCodecs API. FFmpeg.wasm did it in a tenth of the code.&lt;/p&gt;

&lt;p&gt;For browser tools, the ecosystem in 2026 is mature. Use it. The "I built it from scratch" badge is worth less than shipping the tool a month earlier.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mobile-first as an afterthought
&lt;/h3&gt;

&lt;p&gt;50% of traffic to free-tool sites is mobile. Half my early tools assumed a 1280px screen. The fix wasn't responsive CSS — it was rethinking the workflow. On mobile, a "drag and drop your file" interface is useless. People tap, they don't drag. They want one button that opens the file picker.&lt;/p&gt;

&lt;p&gt;If you're building utilities, design the mobile flow first.&lt;/p&gt;

&lt;h2&gt;
  
  
  The architecture that emerged
&lt;/h2&gt;

&lt;p&gt;After 122 tools, the pattern stabilized:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────┐
│  Static Next.js page (SSG)  │  ← SEO, fast first paint
├─────────────────────────────┤
│  Lazy-loaded tool component │  ← only loads when user interacts
├─────────────────────────────┤
│  Web Worker (when needed)   │  ← keeps UI responsive
├─────────────────────────────┤
│  WASM module (when needed)  │  ← for "real" processing
└─────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No API. No database. No queue. No auth. No Stripe. The whole site is static files served from a CDN. My infra cost is the domain and a Cloudflare account.&lt;/p&gt;

&lt;p&gt;This is not appropriate for every product. It is appropriate for &lt;strong&gt;far more products than developers currently use it for&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to stop being clever and just ship a backend
&lt;/h2&gt;

&lt;p&gt;For honesty's sake, the in-browser approach breaks down for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Files &amp;gt;2GB&lt;/strong&gt; — browser memory limits get awkward, even with streaming&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Long-running batch jobs&lt;/strong&gt; — users won't keep a tab open for 20 minutes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anything requiring a private API key&lt;/strong&gt; — you can't ship secrets to the client&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Heavy ML models&lt;/strong&gt; — possible with WebGPU/ONNX but the UX still trails server inference&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For everything else: try the browser-first version. You will be surprised how often it works.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell past-me
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Pick the boring tools first. A &lt;a href="https://brevtool.com/data-tools/json-to-csv" rel="noopener noreferrer"&gt;JSON to CSV converter&lt;/a&gt; ranks faster than a novel idea, because the search demand already exists.&lt;/li&gt;
&lt;li&gt;WASM is not scary. Pick a library, copy the README, ship.&lt;/li&gt;
&lt;li&gt;Don't build your own UI library. Use what exists. Spend the saved time on actual tools.&lt;/li&gt;
&lt;li&gt;Static + client-side is a competitive advantage when your competitors are paying for servers.&lt;/li&gt;
&lt;li&gt;Privacy isn't a feature you bolt on. It's an architecture decision you make on day one.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The web platform is genuinely capable now. A lot of "we need a backend for this" is muscle memory from 2015. It's worth questioning.&lt;/p&gt;

&lt;p&gt;If you want to poke at any of the 122 tools, &lt;a href="https://brevtool.com" rel="noopener noreferrer"&gt;they're all here&lt;/a&gt; — none of them upload your files, all of them are free, and the source patterns above are the same ones running in production. Ask me anything in the comments.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>performance</category>
      <category>programming</category>
    </item>
    <item>
      <title>I shipped 122 web tools without a backend</title>
      <dc:creator>Khoa Nguyen</dc:creator>
      <pubDate>Thu, 07 May 2026 01:47:08 +0000</pubDate>
      <link>https://dev.to/khoanna/i-shipped-122-web-tools-without-a-backend-2hpj</link>
      <guid>https://dev.to/khoanna/i-shipped-122-web-tools-without-a-backend-2hpj</guid>
      <description>&lt;p&gt;A year ago I deleted my server bill.&lt;/p&gt;

&lt;p&gt;Not because I was broke. Because I realized that for the kind of tools I was building — file converters, formatters, calculators, generators — the server was the worst part of the architecture. It cost money, it leaked user data, it added latency, and it was the single biggest reason competitors in the space charge $9.99/month for a feature that could run in 3KB of JavaScript.&lt;/p&gt;

&lt;p&gt;So I deleted it. Then I built &lt;a href="https://brevtool.com" rel="noopener noreferrer"&gt;122 browser-based tools&lt;/a&gt; on top of that decision. Here's what actually worked, what didn't, and why I think every dev should be re-evaluating the "we'll just spin up a Lambda" reflex.&lt;/p&gt;

&lt;h2&gt;
  
  
  The thesis
&lt;/h2&gt;

&lt;p&gt;Every file you upload to a SaaS converter is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sent over the network (slow)&lt;/li&gt;
&lt;li&gt;Processed on someone's server (expensive)&lt;/li&gt;
&lt;li&gt;Stored, even briefly (privacy risk)&lt;/li&gt;
&lt;li&gt;Returned to you (slow again)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For ~80% of common tools, &lt;strong&gt;none of those steps need to happen&lt;/strong&gt;. The browser in 2026 can do it. Not "kind of," not "with limitations" — actually do it, often faster than the round-trip to a server.&lt;/p&gt;

&lt;p&gt;The mental shift: stop thinking of the browser as a thin client.&lt;/p&gt;

&lt;h2&gt;
  
  
  What worked surprisingly well
&lt;/h2&gt;

&lt;h3&gt;
  
  
  WebAssembly for "real" file processing
&lt;/h3&gt;

&lt;p&gt;Every PDF tool I shipped runs in the browser via WASM. PDF compression, merging, splitting, conversion — all of it. The wins:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Pseudocode for the pattern that replaced our backend&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;files&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;arrayBuffer&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;wasmModule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;compress&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;quality&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.7&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nf"&gt;download&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;compressed.pdf&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. No upload. No queue. No "your file is being processed." A 50MB PDF compresses in ~2 seconds on a mid-range laptop, faster than uploading it to a server would take.&lt;/p&gt;

&lt;p&gt;The same pattern works for image compression, video trimming (with FFmpeg.wasm), audio conversion, and even some surprising things like ZIP creation and EPUB generation.&lt;/p&gt;

&lt;p&gt;If you're still routing files through a server for compression or format conversion, you are paying real money to deliver a worse experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pure-JS for the boring 80%
&lt;/h3&gt;

&lt;p&gt;Most "tools" don't need WASM. Most don't even need a framework. A &lt;a href="https://brevtool.com/developer-tools/json-formatter" rel="noopener noreferrer"&gt;JSON formatter&lt;/a&gt;, a &lt;a href="https://brevtool.com/developer-tools/regex-tester" rel="noopener noreferrer"&gt;regex tester&lt;/a&gt;, a &lt;a href="https://brevtool.com/text-tools/character-counter" rel="noopener noreferrer"&gt;character counter&lt;/a&gt;, a &lt;a href="https://brevtool.com/text-tools/text-case-converter" rel="noopener noreferrer"&gt;text case converter&lt;/a&gt; — these are 50–200 lines of plain JavaScript. The tool is the value. The framework is overhead.&lt;/p&gt;

&lt;p&gt;I tried Vue. I tried plain HTML. I ended up on Next.js for SEO reasons (more on that below), but each tool's actual logic is a single function. Don't over-engineer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Web Workers for anything &amp;gt;200ms
&lt;/h3&gt;

&lt;p&gt;The single biggest UX upgrade across the whole site came from one rule: &lt;strong&gt;if a computation takes more than 200ms, it goes in a worker.&lt;/strong&gt; Otherwise the page freezes during processing and people think the tool is broken.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;worker&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Worker&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./hash.worker.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="nx"&gt;worker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;postMessage&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;algorithm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sha256&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;worker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onmessage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;updateUI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hashing a 1GB file on the main thread → frozen tab → user closes it. Hashing the same file in a worker with progress events → smooth experience, user trusts the tool. Same code, ten times the perceived quality.&lt;/p&gt;

&lt;h2&gt;
  
  
  What didn't work
&lt;/h2&gt;

&lt;h3&gt;
  
  
  "Just ship 122 tools and the SEO will come"
&lt;/h3&gt;

&lt;p&gt;This was wrong. I shipped them, they got indexed (264 pages eventually), and Google parked the entire site at average position 72 for months. Indexed ≠ ranking.&lt;/p&gt;

&lt;p&gt;The fix wasn't more tools. It was &lt;strong&gt;fewer, better-linked, better-content tool pages&lt;/strong&gt;. Each tool now has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A unique H1 with the actual keyword&lt;/li&gt;
&lt;li&gt;A "How it works" section explaining the in-browser processing&lt;/li&gt;
&lt;li&gt;An FAQ targeting common variations of the search query&lt;/li&gt;
&lt;li&gt;3–5 internal links to related tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Average position is finally moving. Lesson: SEO for tool sites is content + authority, not tool count.&lt;/p&gt;

&lt;h3&gt;
  
  
  Building everything from scratch
&lt;/h3&gt;

&lt;p&gt;I tried to write a custom WASM PDF library. It took two weeks. PDF-lib already existed and was better. I wrote a video trimmer in raw WebCodecs API. FFmpeg.wasm did it in a tenth of the code.&lt;/p&gt;

&lt;p&gt;For browser tools, the ecosystem in 2026 is mature. Use it. The "I built it from scratch" badge is worth less than shipping the tool a month earlier.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mobile-first as an afterthought
&lt;/h3&gt;

&lt;p&gt;50% of traffic to free-tool sites is mobile. Half my early tools assumed a 1280px screen. The fix wasn't responsive CSS — it was rethinking the workflow. On mobile, a "drag and drop your file" interface is useless. People tap, they don't drag. They want one button that opens the file picker.&lt;/p&gt;

&lt;p&gt;If you're building utilities, design the mobile flow first.&lt;/p&gt;

&lt;h2&gt;
  
  
  The architecture that emerged
&lt;/h2&gt;

&lt;p&gt;After 122 tools, the pattern stabilized:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────┐
│  Static Next.js page (SSG)  │  ← SEO, fast first paint
├─────────────────────────────┤
│  Lazy-loaded tool component │  ← only loads when user interacts
├─────────────────────────────┤
│  Web Worker (when needed)   │  ← keeps UI responsive
├─────────────────────────────┤
│  WASM module (when needed)  │  ← for "real" processing
└─────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No API. No database. No queue. No auth. No Stripe. The whole site is static files served from a CDN. My infra cost is the domain and a Cloudflare account.&lt;/p&gt;

&lt;p&gt;This is not appropriate for every product. It is appropriate for &lt;strong&gt;far more products than developers currently use it for&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to stop being clever and just ship a backend
&lt;/h2&gt;

&lt;p&gt;For honesty's sake, the in-browser approach breaks down for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Files &amp;gt;2GB&lt;/strong&gt; — browser memory limits get awkward, even with streaming&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Long-running batch jobs&lt;/strong&gt; — users won't keep a tab open for 20 minutes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anything requiring a private API key&lt;/strong&gt; — you can't ship secrets to the client&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Heavy ML models&lt;/strong&gt; — possible with WebGPU/ONNX but the UX still trails server inference&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For everything else: try the browser-first version. You will be surprised how often it works.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell past-me
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Pick the boring tools first. A &lt;a href="https://brevtool.com/data-tools/json-to-csv" rel="noopener noreferrer"&gt;JSON to CSV converter&lt;/a&gt; ranks faster than a novel idea, because the search demand already exists.&lt;/li&gt;
&lt;li&gt;WASM is not scary. Pick a library, copy the README, ship.&lt;/li&gt;
&lt;li&gt;Don't build your own UI library. Use what exists. Spend the saved time on actual tools.&lt;/li&gt;
&lt;li&gt;Static + client-side is a competitive advantage when your competitors are paying for servers.&lt;/li&gt;
&lt;li&gt;Privacy isn't a feature you bolt on. It's an architecture decision you make on day one.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The web platform is genuinely capable now. A lot of "we need a backend for this" is muscle memory from 2015. It's worth questioning.&lt;/p&gt;

&lt;p&gt;If you want to poke at any of the 122 tools, &lt;a href="https://brevtool.com" rel="noopener noreferrer"&gt;they're all here&lt;/a&gt; — none of them upload your files, all of them are free, and the source patterns above are the same ones running in production. Ask me anything in the comments.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>performance</category>
      <category>programming</category>
    </item>
    <item>
      <title>I built brevtool.com because I kept having the same experience with online tools:
1. Need to merge two PDF contracts
2. Upload them to a 'free' tool
3. Hit a paywall after 2 files
4. Realize that tool now has copies of my contracts on their server</title>
      <dc:creator>Khoa Nguyen</dc:creator>
      <pubDate>Sun, 05 Apr 2026 17:36:48 +0000</pubDate>
      <link>https://dev.to/khoanna/i-built-brevtoolcom-because-i-kept-having-the-same-experience-with-online-tools-1-need-to-merge-525k</link>
      <guid>https://dev.to/khoanna/i-built-brevtoolcom-because-i-kept-having-the-same-experience-with-online-tools-1-need-to-merge-525k</guid>
      <description></description>
    </item>
  </channel>
</rss>
