Blog

Stretches for programmers: neck, back, wrists and hips

Good stretches for programmers are short and spread across the day: chin tucks, a side neck stretch, an upper-back opener, a doorway stretch, a hip-flexor stretch and two wrist stretches, 35 to 60 seconds each. For a sore neck, add a little shoulder strength work, which has the best evidence: in one trial, 2 minutes a day helped office workers. Go gently, and see a professional if pain lasts or you feel numbness.

This is a routine you can do at your desk, in work clothes, without equipment. Each exercise below has a figure that shows the movement, a dose in plain words and one line on the research behind it. Where the research is thin, the post says so.

Why programmers get stiff and sore

Most people who work at a computer all day feel it somewhere. A 2025 meta-analysis in Scientific Reports pooled 11 studies of 4,647 computer workers and found that 65.9% had musculoskeletal pain in the past 12 months, about 2 in 3. The lower back was the most common place (44%), then the neck (38%), the shoulders (29%) and the wrists and hands (19%). One caveat: all the studies were from one country, Ethiopia, so treat the exact numbers as a rough guide, not a measure of your office.

The same review found pain more common in people who used a computer for 4 hours a day or more, and in people who did no physical exercise. Those are associations. They do not prove that the screen caused the pain. They do match what many developers notice after a long day: the problem is less one bad position and more hours in any position, with little movement in between.

Programmers who work with AI coding agents now sit in a new pattern. In a 2026 JetBrains survey, 68% of professional developers used an AI coding agent at work every day. That means many short waits while the agent works, often spent still, looking at a phone.

What the research says about posture

There is no single correct posture to hold all day, and research has not shown that the shape of your spine is what causes desk pain: moving often matters more than any one position. So this routine does not try to fix your posture. It moves the parts of you that sit still, strengthens the muscles research has studied in office workers, and breaks up long sitting.

How to use this routine

Do one exercise at a time, spread across the day, not all of them at once. Each one takes 35 to 60 seconds. That fits the time you already spend waiting: in Anthropic’s data, the median Claude Code turn is around 45 seconds. If you want more ideas for that wait, there is a separate post on what to do while Claude Code is working.

A few rules make it safe and useful:

  • Go gently. A stretch should feel like a pull, never a sharp pain. Stop if anything hurts, tingles or makes you dizzy.
  • Move slowly and breathe normally. No bouncing at the end of a stretch.
  • Repeat the ones you need. A 2018 review found that static stretching improves range of motion at about 5 minutes a week per muscle, and that the weekly total matters more than the length of one session. One 20-second hold a day adds up to under 2 minutes a week. So pick the two or three areas that bother you most and come back to them several times a day.
  • Mix in strength. For the neck and shoulders, strength work has better evidence than stretching (more on that below).

Neck and shoulders

For neck and shoulder pain in office workers, targeted strength work has the best evidence of any exercise type. In a 2011 trial of 198 office workers with frequent neck and shoulder pain, people who did one exercise for 2 minutes a day, 5 days a week, had about 1.4 points less pain on a 0 to 10 scale after 10 weeks than people who only got health information. That exercise was a raise in the shoulder-blade plane with an elastic band, done until the arms were tired. Stretching has less research behind it, but one 2016 trial of 96 office workers with neck pain found that neck and shoulder stretches twice a day for 4 weeks lowered pain by 1.4 points more than an ergonomics leaflet alone.

Seated chin tuck
Chin tucks6 slow holds of 5 secondsSit tall and slide your head straight back, as if making a double chin. Hold, then relax.Gently, chin straight back, eyes level.

Why: chin tucks train the deep muscles at the front of the neck. A review of 12 trials found strong evidence that this training improves neck muscle coordination and some evidence for head posture, with pain falling about as much as with other neck training.

Neck side stretch
Side neck stretch20 to 25 seconds a sideHold the edge of your seat with your right hand. Tip your left ear toward your left shoulder until you feel a gentle pull, then switch sides.Only as far as is comfortable.

Why: it is a simple neck stretch of the kind studied in the 2016 office-worker trial. Holding the seat keeps the shoulder down, so the stretch stays in the side of the neck.

Lateral raise
Slow shoulder raise10 to 15 slow raises, 3 seconds up and 3 downStand tall with your arms in a shallow V in front of you, thumbs up. Lift to shoulder height and lower slowly.Smaller range, thumbs up.

Why: it is the no-equipment version of the 2-minute exercise in the 2011 trial. Without a band it is easier, so it helps most if you go slowly and keep going until your shoulders feel tired. If you own a light resistance band, the trial used the same movement against one.

Upper back and chest

At a keyboard, the upper back tends to round and the arms reach forward for hours. These three exercises move the upper back the other way and open the front of the chest. Their evidence is weaker than for the neck strength work above: they come from small trials and measurements of muscle length, not large trials in office workers. A small 2026 trial in people with neck pain found that upper-back mobility exercises reduced pain more than neck stabilising exercises, but it had only 24 people.

Chair-back extension
Upper-back opener6 to 8 slow reps, 3-second holdSit back against a stable chair with your hands behind your head. Lift your breastbone up and back over the chair, hold, then come back.Go slowly, well inside your range.

Why: it moves the middle of the spine, which barely moves when you type. Check that your chair does not tip or recline before you lean back.

Seated thoracic rotation
Seated upper-back twist6 to 8 a side, 2-second hold at the endCross your arms over your chest, feet flat. Turn your chest to one side, keeping your hips square, then to the other.Go slowly, well inside your range.

Why: turning from the upper back, not the neck, loosens up the area between your shoulder blades. Plant your feet if your chair rolls.

Single-arm doorway stretch
Doorway stretch20 to 25 seconds a sidePlace one forearm on a door frame, elbow bent at a right angle and no higher than your shoulder. Turn your body gently away until you feel a stretch across the front of your chest.Elbows no higher than your shoulders.

Why: in a study of three chest stretches, a standing one-arm self-stretch against a door frame lengthened the small chest muscle the most. Keep the elbow low and the turn small, especially if the front of your shoulder is sensitive.

Lower back and hips

For the lower back, almost any exercise helps, and no type is clearly the best. A Cochrane review found that exercise is probably effective for chronic low back pain compared with no treatment. A network meta-analysis of 217 trials ranked some types above others but concluded that people should do the exercise they enjoy, so they keep doing it. For preventing a new episode, a 2016 review in JAMA Internal Medicine found that exercise alone lowered the short-term risk by about a third, while back belts, insoles and ergonomic changes alone probably did not.

Seated cat-cow
Seated cat-cow8 to 10 slow cyclesHands on your knees. Round your whole back and let your head drop a little, then lift your chest and arch gently.Small and slow, no forcing.

Why: it takes the lower back through a small, easy range after a long time still. No trial has tested this exact exercise, so it is here for movement, not as a treatment.

Standing hip-flexor stretch
Standing hip-flexor stretch20 to 25 seconds a sideStand in a long split stance with a hand on the desk. Tuck your hips under, squeeze the seat of the back leg, then shift forward a little.Tuck your tailbone under, then shift gently.

Why: in a 2004 trial, hip-flexor stretching improved hip extension over 6 weeks. The idea that sitting “shortens” the hip flexors rests on one cross-sectional study, so treat this as a stretch that feels good after sitting, not a cure for a tight back.

Seated hamstring stretch
Seated hamstring stretch20 seconds a sideSit near the front of your chair with one leg straight out, heel on the floor. Hinge forward from the hips with a long back.Lean from your hips, knees slightly bent.

Why: it stretches the back of the thigh, a common tight spot after long sitting. Keep the knee soft and lean less if you feel it behind the knee or in your lower back.

Wrists and forearms

The research on wrists is the thinnest of all, so expect less from these. In a year-long trial of 549 office workers, both shoulder strength training and all-round exercise reduced pain in the neck, the lower back, the right elbow and the right hand more than a reference group did. For carpal tunnel syndrome, a Cochrane review found only limited and very low quality evidence that exercises help. These stretches are here to move your wrists after hours in one position, not to treat anything.

Wrist flexor stretch
Wrist flexor stretch20 seconds a sideHold one arm out, palm facing away. With the other hand, gently draw the fingers back until you feel the inside of your forearm.Gently, fingers relaxed, no bouncing.
Wrist extensor stretch
Wrist extensor stretch20 seconds a sideHold one arm out, palm down. With the other hand, gently fold the hand down until the palm faces you and you feel the top of your forearm.Gently, fingers relaxed, no bouncing.

Why: these stretch the two groups of forearm muscles you use to type. Keep the pull light. Stop if you feel tingling in your fingers, and do not push the wrist far back or far down for long. Slow wrist circles with relaxed fingers are a gentler option for the same break.

The routine at a glance

Choose one exercise per break and rotate through the areas that bother you. If your neck is the main problem, give it two or three of your breaks each day, including the shoulder raise.

Area Exercise Dose
Neck Chin tucks 6 holds of 5 s
Neck Side neck stretch 20–25 s a side
Shoulders Slow shoulder raise 10–15 slow raises
Upper back Upper-back opener 6–8 reps, 3-s hold
Upper back Seated upper-back twist 6–8 a side
Chest Doorway stretch 20–25 s a side
Lower back Seated cat-cow 8–10 cycles
Hips Standing hip-flexor stretch 20–25 s a side
Hips Seated hamstring stretch 20 s a side
Wrists Wrist flexor stretch 20 s a side
Wrists Wrist extensor stretch 20 s a side

When to see a professional

A desk routine is for general wellness. It is not a replacement for a doctor or a physiotherapist. The NHS says most neck pain lasts only a few weeks, and that back pain often improves on its own within a few weeks. Check with a health professional if:

  • the pain does not get better after a few weeks, or it keeps you from your normal day;
  • you feel numbness, tingling, pins and needles or a cold feeling in an arm, hand or leg;
  • the pain wakes you at night, or is worse at night and does not ease with rest;
  • you notice weakness, such as dropping things or a leg that gives way;
  • the pain started after a fall, an accident or another injury;
  • you feel hot, shivery or generally unwell with it, or have lost weight without trying.

Get urgent help if you have numbness or weakness in both legs, a loss of feeling around your genitals or bottom, new problems controlling your bladder or bowels, or chest pain. The NHS back pain page lists these as reasons to call an emergency number.

While you wait to be seen, gentle movement is usually better than rest. The NHS advises keeping your neck moving rather than holding it still, and to stay active with back pain. Skip any exercise here that makes your symptoms worse.

Questions

Why does my neck hurt when I sit at my desk?

Usually because it stays in one position for hours with little movement, not because of one wrong posture. Research has not found a single correct posture, and the link between a forward head and neck pain has no clear direction: pain may change how you sit as much as the other way round. Changing position often and doing some neck and shoulder strength work are the steps with the most support.

Is it good to stretch your neck if it hurts?

Gentle stretching is generally fine and may help. In one trial, office workers with neck pain who stretched twice a day for 4 weeks had less pain than those who only got a leaflet. A 2025 review found 5 of 6 stretching studies reported less pain, with mixed results overall. Stretch only as far as is comfortable, and stop if it causes sharp pain, tingling or dizziness.

Will tech neck go away?

“Tech neck” is a popular name, not a medical diagnosis, and the posture it describes is not clearly linked to pain in young adults. Neck pain itself usually settles: the NHS says most neck pain lasts a few weeks. Chin tuck training has been shown to change head posture in trials, but whether that matters for pain is less clear. If it lasts longer than a few weeks, see a professional.

Why does my hand hurt when I type?

Often it comes from hours of small, repeated movements with few pauses. In a study of 969 office workers in China, working without breaks was linked to wrist and hand symptoms, though that study cannot show cause. Short breaks, gentle wrist stretches and general exercise are reasonable steps. Numbness or tingling in the fingers, especially at night, is a reason to see a professional.

How often should I get up from my desk?

There is no single proven interval. A 2025 Cochrane review found the evidence that extra work breaks reduce neck or back pain is very uncertain. In one study, break-reminder software made more computer workers report that they had recovered, and a meta-analysis found that micro-breaks slightly reduce fatigue. Moving often, at times you will actually stick to, matters more than a perfect schedule. Timers that interrupt your focus are easy to ignore, which is why natural pauses, such as waiting for an agent, work well.

Sources

  • Demissie B et al. Musculoskeletal disorders among computer workers in Ethiopia: a systematic review and meta-analysis. Scientific Reports, 2025. PMC12287276
  • Andersen LL et al. Effectiveness of small daily amounts of progressive resistance training for frequent neck/shoulder pain. Pain, 2011. Europe PMC; secondary analysis, Lidegaard et al. 2013, PMC3892746
  • Tunwattanapong P et al. Neck and shoulder stretching for office workers with neck pain. Clinical Rehabilitation, 2016. PubMed
  • Blomgren J et al. Effects of deep cervical flexor training. BMC Musculoskeletal Disorders, 2018. PMC6263552
  • Thomas E et al. The relation between stretching typology and stretching duration. International Journal of Sports Medicine, 2018. PubMed
  • Mahmoud NF et al. The relationship between forward head posture and neck pain. Current Reviews in Musculoskeletal Medicine, 2019. PubMed
  • Damasceno GM et al. Text neck and neck pain in 18 to 21-year-old young adults. European Spine Journal, 2018. PubMed
  • Hayden JA et al. Exercise therapy for chronic low back pain. Cochrane, 2021. Cochrane; network meta-analysis, Journal of Physiotherapy, 2021. PubMed
  • Steffens D et al. Prevention of low back pain. JAMA Internal Medicine, 2016. JAMA
  • Winters MV et al. Passive versus active stretching of hip flexor muscles. Physical Therapy, 2004. Europe PMC
  • Andersen LL et al. Effect of physical exercise interventions on musculoskeletal pain in all body regions among office workers. Manual Therapy, 2010. Europe PMC
  • Feng B et al. Wrist and hand symptoms and carpal tunnel syndrome among office workers in China. BMC Public Health, 2021. PMC7789363
  • Luger T et al. Work-break interventions for preventing musculoskeletal symptoms and disorders in healthy workers. Cochrane, 2025. Cochrane
  • van den Heuvel SG et al. Effects of software programs stimulating regular breaks and exercises. Scandinavian Journal of Work, Environment & Health, 2003. SJWEH
  • Konrad A et al. Chronic stretch training and musculoskeletal pain. European Journal of Applied Physiology, 2025. PMC12354564
  • NHS. Neck pain and Back pain.

Spare Minute is a general wellness app and this is not medical advice. Go gently, and stop if anything hurts. If you have pain that lasts or an injury, check with a health professional.

Written by Enric Planas Mulet, who makes Spare Minute.