Can we please, finally, have a Select All / Copy All button for code on Stack Overflow?

Yes, this question, again.

Shortcut or button for copying posted code from Stack Overflow

The main reason I am asking this again is because this feature request has been ignored (not denied that I am aware of, but then I'm not sure how obvious it would be that it was denied) for years. There is literally a comment from three years ago complaining about how this feature request had already existed for two years.

Meanwhile, with tablets and smartphones saturating third-world countries in which access to computers is scarce and Internet connectivity was practically non-existent five years ago (see: Burma) it is more important than ever from a usability standpoint. I personally save snippets relevant to a problem I'm looking to solve while on a smartphone, and a select all or copy code button would be very helpful.


  • Even on the computer selecting a single line that extends beyond the right border can be an exercise in frustration.
  • Selecting large amounts of code is cumbersome.
  • Selecting anything on a tablet/phone is cumbersome.
  • It is all-around faster for everyone planning on pasting into an IDE or etc.
  • It is faster for people trying to help a newer user by creating a jsfiddle, which typically requires the copying of 3 different large blocks of code.
  • It is more accurate for pasting anywhere. I have often accidentally copied other things or just missed a semicolon, etc.


  • It normally only takes a few seconds and a few more steps, never mind the caveats mentioned above or tablets/phones.
  • People are lazy and we should fight against laziness. And air conditioning, and credit.
  • This would encourage people to copy-paste code from one answer into another, because even though a one-hit button would only save three or four steps and nobody should sweat the few seconds it normally takes, those few seconds will somehow deter someone from copy-pasting and cause them to write out their own answer for like 10 minutes.
  • 17
    Ctrl-C, Ctrl-V ... – Robert Harvey Apr 23 '14 at 20:28
  • 20
    @RobertHarvey This misses the point of the question: the issue is really that selecting all the text in a preformatted area is a pain, doing for instance ctrl-A to select all text actually selects text even outside the area, so you have scroll to the top part of area, start selection, scroll to bottom, shift click to end of area. Only then are you ready to ctrl-C. Compare this to clicking on one button to select all text in the area, THEN you could do ctrl-c ctrl-v. It's a no-brainer. – Oliver Apr 24 '14 at 3:15
  • 2
    Yes, we should encourage terrible behavior in developers. – Will Apr 24 '14 at 13:21
  • 2
    I honestly don't see any drawbacks and doubt it will encourage poor behaviour that otherwise wouldn't occur; such people would be using emoticons instead of text and would be easy to spot. :D – dilbert May 19 '14 at 22:01
  • 4
    Here is a thought: add a Copy Code button to Questions but not to Answers. – usr2564301 May 19 '14 at 22:12
  • 1
    Should be able to hold down the shift key and use arrow keys to select more text after you have started a selection with your mouse. – Joe W May 19 '14 at 22:17
  • 3
    Is this ever going to be implemented? – adolf garlic Jan 19 '16 at 15:48
  • @adolfgarlic Nobody knows. I'm as frustrated about it as you but not much we can do here, short of taking the CC licensed content and doing it ourselves. – Trilarion Mar 29 '16 at 10:52
  • 5
    github.com/MrMino/StackOverflowCtrlC <- Let me just leave this right here. – Błażej Michalik Apr 11 '16 at 3:07
  • @BłażejMichalik wish I had the +100 button ;) – amonk Jun 22 '17 at 9:00
  • 1
    The best illustration of why there is a need for this can be found in this video: youtube.com/watch?v=U6SfRPwTKqo – Silvia Pina Jul 27 '18 at 16:20

Feb-2019: From the comments above: try https://github.com/MrMino/StackCtrlC, it works!

The original question Shortcut or button for copying posted code from Stack Overflow found quite a lot of agreement and all the top 10 answers are positive.

The question should therefore be rather why it wasn't implemented since 2009 when the feature was requested? I doubt it's the complexity of implementation. Maybe it just went off the radar and then this reminder is very valuable.

I found this question because I wondered about the same (needing three times to select a code block with scrollbars and not copying too little or too much).

I agree with the Pros in the question but I see also that some people would not care. I don't think they are a majority but it's like preferring full fledged IDEs or text editors. The more choice the better. So if there is concern that it might annoy those who don't need it make it optional when it is a button or make it just a shortcut but put it in the development pipeline.

In the case of a shortcut just do it. I would be thankful.

  • 1
    I completely agree. It would be very convenient. I was in fact just about to post the same question. What type of implementation could this feature have by the way? – codezombie Sep 25 '15 at 10:26
  • 1
    @JasonStack Good question. Copying to the clipboard is a bit of a problem. and might not be supported everywhere, but selecting the current code box (so you just have to hit ctrl.+c) should be straightforward to implement. I think I even saw this feature already on other websites. – Trilarion Sep 25 '15 at 12:17
  • 2
    I've had the same question, but the quickest way to solve this would have been a chrome extension. I found a nice one here by rainsoft.io. It adds the functionality until StackOverflow does. – Chris - Jr Apr 20 '17 at 13:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .