You can cut an aluminum soda can into a small strip and wrap that around and fold it like a tiny burrito into the end.
Crimp with pliers.
Picture lovingly misappropriated from http://billgrady.com/wp/2002/11/14/how-to-wrap-a-burrito/
bicycles.stackexchange.com/users/11160/RoboKaren
The empty ink-tube of a ballpoint pen makes good cable ends.
The metal ones may be squeezed into place.
If you have a plastic one cut off 1 cm, put over the cable end and heat with a flame.
bicycles.stackexchange.com/users/10401/Carel
I usually use an old spoke nipple.
Slide it over the end and crimp with an electrical (stake-on/solderless connector) crimper.
bicycles.stackexchange.com/users/3083/mikes
I have actually used these options: Epoxy glue:
let it dry a little before applying.
It is too liquid just after mixed, so let it dry and use it like if it were modelling putty.
Thin cooper wire from a telephone cord.
Wounded it around the end of the cable.
It would look like a bass guitar string.
Solder wire applied cold, wound a couple of turns and crimp it with pliers.
Thin metal office supplies used for holding pieces of paper together (fasteners and similar) cut into small pieces and crimped with pliers.
Failed attempts were made with masking tape, electrical tape and duct tape.
Soldering it was also a fail for me, the molten solder would not adhere to the steel cable, that's why I ended just crimping it.
bicycles.stackexchange.com/users/2177/Jahaziel
Wrap it tightly with electrical/gaffa tape?
bicycles.stackexchange.com/users/11489/linguamachina
Anyone with a roll of lead-based solder can hammer it out against an iron plate to make a thin foil, then wrap the cable with it, and finally "swage" it by hammering it down.
The soft lead will press into the cable gaps and should create a very tight nipple.
I tried this at the handlebar end with not such good results, trying to jerry-rig a cable anchor: although the foil layer touching the cable does swage in well, the outer layers are too brittle to hold well together.
It's like trying to make a sandwich out of phyllo dough, the gaps make for a crumbly product.
I imagine it'd be pretty easy to make a little baby crucible out of steel, stone, or something else that melts at a higher temperature than lead.
It would be a mold for the anchor.
It would include a slot where you lay the cable halfway through it.
Then, stuff the cavity with solder (melt it in, jam your iron in, use a torch, whatever).
That should make for a good DIY anchor, meaning you could buy cable in bulk and make your own cables.
bicycles.stackexchange.com/users/49488/Pete Zelchenko
I use normal solder - this keeps the strands together and negates the need for a cap.
I thread the cable and then solder where I will cut, and then trim the excess off.
Note this method leaves a sharpish point still.
The trick is preparation... if you have stainless steel cables then they don't take solder too well.
You need to clean the end with a solvent to remove any grease, sand it or file it some to abrade the surface, use some flux liquid and a decently hot soldering iron.
Silver solder works better but is definitely overkill for a bike cable.
bicycles.stackexchange.com/users/19705/Criggie
If you have a soldering iron and some solder, that may stop it from fraying further, but won't make it any less sharp.
You could consider a bit of alu foil, but I doubt this would stay on.
Perhaps with some glue suitable for metal?
Perhaps a small cable tie done up super-tight with pliers?
bicycles.stackexchange.com/users/5337/James Bradbury
I am in a pinch and need something to crimp onto the end of my brake cable to stop it fraying. There aren't any hardware shop's nearby and its a long way to the nearest bike shop.  Any household object that'll do the job?  Any good stop-gap until I can get a proper part?
What can I use for a DIY cable end?
bicycles.stackexchange.com
<maintenance><preventative-maintenance>
bicycles.stackexchange.com/questions/23501
bicycles.stackexchange.com/users/None/
There are numerous suggestions for making a DIY cable end. These include a strip from an aluminum soda can, an old spoke nipple, solder wire, paper clips, empty ink tube of a ballpoint pen, epoxy glue and metal glue. A piece of metal from a can, a piece of copper wire or cold solder wire can be wrapped around and hammered down or crimped with pliers. The wire can be coved with a spoke nipple, ballpoint pen cap or cable tie. The end can be glued or soldered, but it may be difficult to get the solder to adhere to the cable.
A piece of metal from a can, a piece of copper wire or cold solder wire can be wrapped around and hammered down or crimped with pliers. The wire can be coved with a spoke nipple, ballpoint pen cap or cable tie. The end can be glued or soldered, but it may be difficult to get the solder to adhere to the cable.