I found a similar thread
https://www.electro-tech-online.com/threads/convert-220-ac-to-3-6-vdc-for-lighting-led.36652/ however they are using Capacitors as well which will make circuit bulkier.
Will this circuit work too ?
**broken link removed**
It is the only solution that i know. you will have to use a circuit as shown by the above post.
The impendence of the cap is used here instead of a resistor to limit the current.
The benefit is that a cap doesn't heat up, as the current ans voltage are 90deg out of phase.
You can use a simple formula for the impendence of a cap.
Z=1/(2*pi*50*C)
Generally, as it is shown, 180-220 nF is fine for a 5mm red led.
And dont forget to use a diode to prevent high reverse voltages.
A 1n4007 in opposite dir in parallel to the LED will do.
Make sure that the voltage rating of the cap is 400V or so.
But, this type of supply is not recommended if you plan to use it for serious circuits.
Use a limiting cap,a fuse,a full wave bridge rectifier, a zener and a filter electrolytic cap to create a useful power supply without transformer.
Limiting caps with values ranging upto 2.2uf 400v are small enough to be used as a cheaper and smaller alternative to transformers.
But, don't think of using transformerless supply for expensive circuits. They can blow anytime.