We propose a method to exactly generate Brownian paths x
c
(t) that are constrained to return to the origin at some future time t
f
, with a given fixed area
A
f
=
∫
0
t
f
d
t
x
c
(
t
)
under their trajectory. We derive an exact effective Langevin equation with an effective force that accounts for the constraint. In addition, we develop the corresponding approach for discrete-time random walks, with arbitrary jump distributions including Lévy flights, for which we obtain an effective jump distribution that encodes the constraint. Finally, we generalise our method to other types of dynamical constraints such as a fixed occupation time on the positive axis
T
f
=
∫
0
t
f
d
t
Θ
x
c
(
t
)
or a fixed generalised quadratic area
A
f
=
∫
0
t
f
d
t
x
c
2
(
t
)
.