Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Bookmarklet that generates download link for a Soundcloud upload
(function(d) {
var dl = d.createElement('a');
dl.innerText = 'Download MP3';
dl.href = ""+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1]; = d.querySelector('em').innerText+".mp3";
d.querySelector('.primary').appendChild(dl); = '10px'; = 'red'; = 700;
/** Minified **/
(function(b){var a=b.createElement("a");a.innerText="Download MP3";a.href=""+b.querySelector("#main-content-inner img[class=waveform]").src.match(/\.com\/(.+)\_/)[1];"em").innerText+".mp3";b.querySelector(".primary").appendChild(a);"10px";"red";})(document);

pheuter commented Mar 5, 2012

To use, simply navigate to a Soundcloud page of a song and enter the following into the browser address bar:

javascript:(function(b){var a=b.createElement("a");a.innerText="Download MP3";a.href=""+b.querySelector("#main-content-inner img[class=waveform]").src.match(/\.com\/(.+)\_/)[1];"em").innerText+".mp3";b.querySelector(".primary").appendChild(a);"10px";"red";})(document);

You will see a red download link appear. Click on it, and the song will download.

Download Link

Safari Extension

wow, so simple, thankyou!

Nice one!

awesome work man. kudos! XD

Very nice! I added some styling, so that it blends in nicely with Soundcloud's design.

Much appreciated. Just used it to get this fantastic piece:

ioquatix commented Mar 6, 2012

This is a great hack, but seriously SoundCloud is an awesome platform so IMHO it is good to respect the artists who make their work available.

vext01 commented Mar 7, 2012

Greasemonkey script perhaps?

the script no longer seems to work.. anyone else have any luck or did they patch it?

hodbby commented Mar 21, 2012

There is a much easier way:

  1. Go to
  2. find your song
  3. rename the string to be
  4. you will get new screen- click on download and there you have.

My updated version works (for now).

thank you so much for the updated version duncan. I got it to work on 3 out of 5 songs i tried it on!

Updated again. Now it works on soundcloud pages with multiple players including the nano and small size players and on sets.

A note on sets: If you are on a set's dedicated page all set track download links will be added. If you're on a page like your Soundcloud dashboard, set track download links may not appear until the specific track in the set has been clicked to begin playing. Using the bookmarklet multiple times should be safe.

Hey this no longer works ... is there any new work around?

rediris commented Jul 1, 2012

As an independent artist, I'm glad this tool no longer works. This is a fine example of people not only taking musicians for granted, but disrespecting the wishes of the musicians to not have their music downloaded without permission.

ddarvish commented Jul 1, 2012

rediris commented Jul 1, 2012

Thanks for your thoughtful response. Judging from the lack of punctuation in your sentences, and your assumption that artists you pay hundreds of dollars to actually play good music, I'm going to guess middle school, or (maybe) high school, and very likely suckling the teat of entitlement. I'm not sure that I should even gratify your comment with a response, but you've raised my ire for several reasons, and I hope my monologue might get the attention of the developer.

Firstly, if you can take enough time to search out a bookmarklet to self-righteously "borrow without asking" songs from Soundcloud, then you could take that same amount of time to simply ask the artist for a song. Why not reach out and make a meaningful connection in the world - after all, these are independent artists we're talking about - not the inaccessible 1% of famous and signed musicians you've (maybe justifiably) placed on a pedestal. Most unsigned artists I know (myself included) would welcome the opportunity to have a dialogue with a potential fan, and might even be open to barter options if $1 were too much to shell out for a tune. For example - if you visit my site, and leave a valid email address, you get a free download. This brings me to my next issue: the worth of a musician's work.

It's great that some musicians play shows in which their fans pay upwards of $100 for a ticket. However, for 99% of musicians, this is simply a daydream or an aspiration. Good musicians spend several hours a day practicing their craft (time unpaid), and are often subject to the limited compensation provided at cafés, bars, clubs, etc. If you do the math, an average musician who spends 5+ hours practicing, and plays a gig for 3-4 hours (add to this out-of-pocket transportation time and cost, and set-up/tear-down time), you're counting on making less than the average person flipping burgers. Why? To please people with a mentality like yours? Cobain sang, "Here we are now, entertain us" for a reason, didn't he? He wasn't exactly clamoring to win the approval of his audience. He wasn't praying to become popular enough to have his music be "worth stealing," and neither am I.

If the average independent musician makes less money than a person flipping burgers, how are they to record an album in a semi-decent studio priced at upwards of $50 an hour? Ah, yes, flipping burgers. Brilliant. So an average musician, who might have more talent than some of the acts you're seeing paid for with your parents' money, is doing shifts flipping burgers, practicing 5+ hours, putting in another 6 hours traveling and gigging (per day), and being gracious enough to stream the product of her/his creative outpouring on Soundcloud just so someone can skirt the protection and download it for free? Talk about devaluation.

Now that I've gotten all of this off my chest, please accept my apologies for insinuating that you're an entitled middle or high schooler sucking on the teat of entitlement, or that your parents paid for your concerts. PM me your email address, and I'll send you a link to download a free tune.

You seem to think that being a musician is a job. It's not, it is a hobby. You seem to think you're entitled to payment for the recorded fruits of you hobby, because you chose to make music and making music happens to be difficult and requires a lot of practice and knowledge and money. You seem to think that, even though you put your recordings on the internet for free, for everybody to grab.

In my opinion you're not entitled to payment. Being a musician can indeed be very hard, I'm not denying that. But it is a choice to spend your time making music –(ideally) having fun!–, instead of, for example, flipping burgers to pay the rent.

This script doesn't didn't do anything the artist didn't give permission for. Soundcloud sends you an 128 kbps mp3 file and plays it with it's player. All this script did is, in addition to playing it with Soundcloud's player, is save that very same mp3 to your hard disk. If you don't want Soundcloud to send people an mp3 of your recordings, you should not put it on Soundcloud (or any equivalent website) in the first place.

By the way, isn't it one hell of compliment when someone goes to 'all' the trouble of downloading a song of yours to be able to listen to it on his/her iPod?

rediris commented Jul 1, 2012

@britishtea: You have managed to insult every musician I know with your statement above: "You seem to think that being a musician is a job. It's not, it is a hobby." Just because people "play" music doesn't mean it isn't work. There are musicians who earn all of their income via music – people who practice, perform, teach, etc. Does that make it a hobby?

I wish there were a script to prevent people like you from having any access to music, just to serve you right for taking musicians for granted.

As for this script, it enables something that is disabled by default for those musicians who chose to disable downloads. If an artists chooses to disable downloading, but allows streaming, why not just respect it?

And, again, I bring up the point of dialogue - why not just ask? Why take?

I'm a musician myself :) I'm not saying being a musician can't be a job. It obviously can. I'm just saying that if you chose to spend your time making music, you aren't (automatically) entitled to payment. Especially not when you put your 'product' online for free. If you find someone who will hire you to record an album, great!

There's a small difference between streaming and downloading, one that is mostly visual. In the end they achieve the same result: they deliver a file from a server to a client. The client can do whatever he wants with the files he receives. One of those things is play the file with the Soundcloud player, but there is a lot more you can do with that file. If you have a problem with that, you shouldn't let the server send files to client in the first place.

As to your point of dialogue, the answer is simplicity.

P.S. I'm a musician myself.

rediris commented Jul 1, 2012


As a musician, you're obviously used to shooting yourself in the foot when it comes to visualizing the value placed on your creative efforts. I suggest you think more highly of your efforts. It's true a musician who puts their stuff online for sale isn't entitled to payment (that is a factor of how "deserving" they are in the eyes [or ears] of the listener [it's subjective, isn't it?]), but it also doesn't entitle the listener to the track for free, especially without asking.

As for the streaming/downloading debate: the whole point in preventing downloading is to ensure that a client doesn't do whatever he/she wants with the file "received". Streaming a file doesn't entitle the listener to ownership - it entitles A streaming file isn't cached locally - it is streamed from the server. In many cases, the actual URL is obfuscated. Why go to all this trouble if there is "no difference" between downloading and streaming?

As to your response about simplicity, why not call a spade a spade - it is laziness and utter disregard for a human connection. It is rooted in a trigger-happiness based on convenience. And I would argue that as a musician, this trigger-happy mentality has already helped undermine your career as a musician, hobby or not.

P.S. Send me a link to your Soundcloud tracks, so I can use this bookmarklet to "stream" your songs.

I'll stop replying here now, as I've said what I wanted to say. This bookmarktlet was a convenient tool to enjoy some good music that's freely available on the internet in other players than the Soundcloud player.

Here's a link to my Soundcloud profile: Do with it what you want :)

Guys, sorry to disturb your conversation, but let's get back to hacker business: This bookmarklet should be updated to work with the next version of Soundcloud:

My updated version is still working on the original site. I've added myself to the soundcloud next waiting list, and I'll go ahead and update or create a new version to get things working over there too.

jojbot commented Dec 10, 2012

britishtea - you are an idiot.

Completely agreed with @jojbot. @britishtea, please go fork yourself, thanks.

But I'll still download songs because you know what? If I listen it on SoundCloud or an MP3 player, it makes no difference whatsoever.

@duncanbeevers do you know if your version could be modified to be used on mixcloud as well ?
(maybe not.. not the same API etc etc..)

Hexkbr commented Feb 17, 2014

This made my day..thanks a lot :)

@marcandrebenoit I doubt it. The version I wrote is pretty soundcloud-specific. No reason a different one couldn't be written for MixCloud, but I just don't use the service that much.

You may follow this simple guide to download and convert SoundCloud songs to MP3, WAV, FLAC, at

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment