Edit a recorded strava activity?
Yes this is possible.   First up I'll be completely blunt

If you're editing your ride to make it look faster, then you're only cheating yourself.


EDIT - THIS WENT AWAY in 2017ish.     However I know strava's app sometimes just stops.  If you have a damaged ride in strava, then use  the SNAP tool at http://strava-tools.raceshape.com/snap/  Feed in the activity ID number which is in the URL when you view the activity.  Then you can tweak portions of your ride back to fit.  SNAP will let you download a GPX file, which can then be uploaded to Strava.com with the upload file function.  Please note, you will end up with two rides, and it will say &quot;Atul rode with Atul&quot; which is wrong.  Once you're happy the new ride is good, delete the old ride.

If you've got a ride that was seriously truncated, and SNAP won't let you tweak it, then you have more to do.
Android Users

Open Google's timeline at  https://www.google.com/maps/timeline?pb   then click Today and see how your ride path was - if its no good then give up here.

Click the gear icon in the bottom right corner and choose &quot;Export this day to KML&quot;  save the file called history-2017-01-28.kml

We need to massage the KML fle to GPX format.  First time I did this was manually with lots of copy and paste which was horrible.  But since then someone's created    https://kml2gpx.com/
which does a fair job.

So upload the gpx file to strava, and then use the crop tool to trim it down.

Since google only takes a location point once a minute, compared to strava's 0.1-10 points/sec the track is a lot chunkier.   Use the SNAP tool as mentioned earlier to get it back on track.


Apple Users
I have no idea - does apple have any tracking like google?
Newton / iBike / powerpod
Grab the Isaac software from http://www.ibikesports.com/support/isaac-software-downloads/  and see if it can help.
Garmin / other bike computer
If your dedicated hardware has munched the ride, you may be stuffed too.  Check out forums - there could be a way to get some info back.
Last Resort
You can create a track in Google Maps and &quot;save as&quot; a KML which can then be massaged into a GPX file.  This is long and tedious, and your times will be completely made up.
Last-Last Resort
A GPX file is only an XML formatted text file.  You can generate one by hand with a text editor.  The format can be seen by downloading an existing ride.
Good to &quot;make up&quot; your distance.  You set a point at every turn and give it a time.  Elevation can be omitted.  I have used my gopro footage as a timebase to figure out offsets between turns/points.  This will produce straight lines between corners with a steady speed between them.  Also, you won't match many segments because of a lack of points
Ultimate Final Last Resort So your best plan is to

Obey rule 5, and go do the route over again.