There are various ways, depending on your decimal
example .125 = fraction? 125/1000 then simplify 25/200 5 /40 1/8 the calc on this website will sometimes do this for you
example 2 .3333333333 ... = fraction?
set x = .3333333.... then 10x = 3.33333..... 10x - x = 9x = 3.3333.... - .3333.....
9x = 3
x = 3/9 = 1/3
Do you have a SPECIFIC example???